Article

How to Back Up a Cheap VPS Without Paying for Backup Storage

How to Back Up a Cheap VPS Without Paying for Backup Storage

A budget VPS is a deal until the day it is not. The provider goes dark, a disk corrupts, or a bad update wipes a config directory you spent months tuning — and the server that cost almost nothing suddenly costs you everything stored on it. The fix is not an expensive backup plan. It is a small, boring setup that runs itself: a versioned backup on one machine, a copy somewhere else, and a restore you have actually tested.

That setup is the subject of a recent discussion on LINUX DO, where users compared notes on protecting data on inexpensive, sometimes unstable servers. The thread's consensus is worth repeating because it is the opposite of how most people start: a backup is not a second copy of your files, and a sync tool is not a backup tool. This article turns that consensus into a concrete plan, using free open-source tools whose behaviour is documented, and flags clearly where a detail comes from forum experience rather than a manual.

Start with what you would actually miss

Before picking a tool, list what is irreplaceable. On a typical cheap VPS that list is short: application data (databases, uploaded files, notes), configuration (nginx, Docker Compose files, systemd units, firewall rules), and the handful of secrets that let you rebuild (SSH keys are best kept out of backups entirely — more on that below). The operating system itself is not worth backing up. You can reinstall it in minutes; you cannot reinstall your data.

A useful rule of thumb from the forum discussion is to back up the directories you would need to rebuild the server from a fresh install, plus a database dump — and nothing else. Dumping a database to a file before the backup runs matters because copying a live database file mid-write can produce a backup that looks fine and restores broken. A cron job that runs mysqldump or pg_dump nightly into a backup directory, and then backs up that directory, avoids the whole problem.

The 3-2-1 rule, on a near-zero budget

The classic 3-2-1 rule says: three copies of your data, on two different media, with one off-site. That sounds expensive until you realise the "media" can be two VPS boxes from different providers, and the "off-site" copy can be a free cloud storage account used only as a dumb destination. Forum users in the thread describe exactly this shape: a primary server, a second cheap box that receives backups, and a cloud copy for the case where a whole provider disappears at once.

You do not need all three layers on day one. The ordering that matters is: first get a versioned backup running somewhere other than the server itself, then add the second location, then automate a restore test. A backup that has never been restored is a hypothesis, not a safety net.

Option 1: restic to object storage or a second server

restic is the most common recommendation for this job, and its design explains why. It stores backups as snapshots in an encrypted repository: each backup run creates a new snapshot, unchanged data is deduplicated so only new or changed chunks are transferred, and everything is encrypted before it leaves your machine. The repository can live on local disk, over SFTP, or on S3-compatible object storage. Losing the repository password means losing the backups — there is no reset mechanism — so store it in a password manager, not in the same backup.

A minimal nightly setup looks like this:

# Initialise once (the password becomes the repository key)
export RESTIC_PASSWORD="a-long-password-from-your-password-manager"
restic -r sftp:backup-user@backup-box:/srv/restic-repo init

# Nightly backup, keeping the last 7 daily and 4 weekly snapshots
restic -r sftp:backup-user@backup-box:/srv/restic-repo backup /srv/data /etc
restic -r sftp:backup-user@backup-box:/srv/restic-repo forget --keep-daily 7 --keep-weekly 4 --prune

The forget --prune step is the part beginners skip. Without it, snapshots pile up forever and the cheap backup box fills up. With it, retention is automatic. A matching restore test is one command: restic restore latest --target /tmp/restore-test, followed by actually opening a restored file.

Option 2: BorgBackup over SSH to a second cheap box

BorgBackup (Borg) is the other deduplicating archiver that comes up constantly in these discussions, and it suits a two-box setup particularly well: Borg can initialise and access repositories on a remote host over SSH, and each backup creates a named archive inside the repository. Like restic it deduplicates across backups, so only changes are stored, and it optionally compresses and encrypts with authenticated encryption — useful when the backup target is a box you do not fully trust.

The workflow mirrors restic's:

# Initialise once
borg init --encryption=repokey ssh://backup-user@backup-box/srv/borg-repo

# Nightly backup with a date-stamped archive name
borg create --stats ssh://backup-user@backup-box/srv/borg-repo::daily-{now:%Y-%m-%d} /srv/data /etc

# Keep 7 daily and 4 weekly archives, freeing the space
borg prune --keep-daily 7 --keep-weekly 4 ssh://backup-user@backup-box/srv/borg-repo

Choose restic if your destination is object storage; choose Borg if your destination is another Linux box over SSH and you want its mature pruning and compression controls. Running both at once is not extra safety — it is extra maintenance. Pick one and learn it properly.

Option 3: Syncthing plus rclone for the off-site copy

The third pattern from the discussion is a two-tool chain. Syncthing is a free, open-source, decentralised file synchronisation application: it syncs files peer-to-peer between your own devices, without passing through a third-party server, and connections are protected with TLS. That makes it a good way to mirror data from the VPS to a home machine or a second server continuously, with no cloud account involved.

But — and this is the point the forum thread keeps circling back to — sync is not backup. If you delete a file or ransomware encrypts it, Syncthing will faithfully propagate that change to every device. That is why users pair it with a versioned tool, or point rclone at the Syncthing destination as the off-site leg. rclone is a command-line program for managing files on cloud storage, and it can copy a directory to dozens of providers, including over WebDAV. The safe form is rclone copy, which never deletes files at the destination; the dangerous form is rclone sync, which makes the destination match the source exactly, including deletions. For a backup destination, copy is the default you want, and sync is a footgun to use only deliberately.

A practical chain, then: Syncthing mirrors the VPS data directory to a home server, and a nightly rclone copy pushes that mirror to cloud storage. The cloud copy is the one that survives both the VPS provider and your house having a bad day.

What the forum gets wrong, and what to watch

Three cautions came out of the discussion that are worth stating plainly. First, several users described using free cloud storage tiers as their off-site copy. That works only within those tiers' limits, which change without notice — treat a free tier as a bonus copy, never as the only copy, and check the provider's current terms yourself before relying on it. Second, do not back up secrets the way you back up data: SSH private keys and password-manager vaults belong in a password manager and an offline copy, not in an automated backup repository that another machine can read. Third, the single most common failure mode is not a missing tool but a missing schedule: a backup that ran once, manually, three months ago. Put the backup command in cron or a systemd timer, and put a log line somewhere you will actually see when it stops.

ApproachVersioned?Off-site?Best for
restic to S3/SFTPYes, snapshotsYesOne tool, object storage destinations
Borg over SSHYes, archivesYes, second boxTwo Linux boxes, SSH only
Syncthing + rclone copyOnly via rclone sideYes, cloudContinuous mirror plus a cloud copy
Plain rsync mirrorNoIf remoteFast, but not a backup on its own

The monthly restore ritual

A backup plan is finished only when the restore is routine. Once a month, pick a random file from a week ago and restore it to a temporary directory. Once a quarter, restore a full directory and check that the application starts from it. Write down the commands that worked — under stress, after a real outage, you will not remember flags you used once. If a restore fails, that is the system working: it failed on a quiet Tuesday, not during an outage.

Cheap servers are a good deal precisely because you accept that any one of them can disappear. The price of that deal is a backup setup that does not depend on the server surviving. A versioned tool, a second location, and a tested restore add up to roughly an hour of setup and a few minutes of attention a month — which is, as the forum discussion puts it, a lot cheaper than the alternative of starting over.

Further reading

  • If you have not picked your server yet, see How to Choose a VPS first — the backup plan is easier when the box itself is a good fit.
  • For more on the cheap-server ecosystem this setup is designed for, see The Free VPS Hunt.
Keep reading
Why ChatGPT Hedges Every Answer — and How to Get a Straight One
Read next →