Skip to content
From $4.82/mo

How do you back up a VPS?

By the VPSRomania teamLast updated 6 min read

Short answer

To back up a VPS, dump each database to a file, then send encrypted, versioned snapshots of /etc, the web roots and those dumps to another machine with restic every night, keep at least 7 dailies, and test a restore monthly. VPSRomania also sells daily backups with 7 copies for 18% of the plan price, on servers paid in crypto.

In brief
  • 3-2-1 rule: three copies, on two kinds of storage, one of them away from the server.
  • Databases: dump them first; copying live database files gives a broken backup.
  • Tool: restic encrypts, deduplicates and keeps history; rsync only mirrors.
  • Hosted option: daily backups, 7 kept off the machine, restored by the team on request, 18% of the plan.
  • Test: a backup you have never restored is a hope, not a backup.

Which VPS backup method should you use?

The methods are not exclusive: the hosted option protects against a lost server, your own restic copy against a lost account or a mistake you notice late.

VPS backup methods compared, VPSRomania guide of 30 November 2026
MethodHistoryEncrypted by youStoredRestoreCost
VPSRomania daily backups7 daily copiesNoOff the server, at VPSRomaniaBy the team on request, whole server18% of the plan price
restic to another serverAs many as you keepYesWhere you chooseBy you, file by file or wholeStorage only
rsync mirrorNone (latest only)NoWhere you chooseBy youStorage only
Database dump onlyAs many as you keepOptionalOn the server unless copiedBy youFree

A copy that stays on the same disk protects against neither a deleted server nor a reinstall.

How to set up nightly encrypted backups with restic?

  1. Choose a destination

    A second small server in another city, a storage box with SFTP or an S3-compatible bucket. Give it its own SSH key from the VPS.

  2. Install restic and create the repository

    Run apt install restic, store a long repository password in /root/.restic-pass, then restic init against the destination.

  3. Dump the databases

    Write each database to /var/backups with mysqldump --single-transaction or pg_dump before every run.

  4. Back up the right folders

    Include /etc, /var/www, /var/backups, /root and the application's data folders; exclude caches and /var/lib/mysql itself.

  5. Prune old snapshots

    Run restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune so the repository does not grow forever.

  6. Schedule and test

    Run the script nightly from cron or a systemd timer, run restic check weekly, and restore one folder to /tmp each month.

/root/backup.sh (destination: an SFTP account on backup.example.net)
#!/bin/sh
set -e
export RESTIC_REPOSITORY=sftp:[email protected]:/srv/restic/web1
export RESTIC_PASSWORD_FILE=/root/.restic-pass

mysqldump --single-transaction --all-databases > /var/backups/all-databases.sql

restic backup /etc /var/www /var/backups /root --exclude /root/.cache
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune
First run, schedule, check and restore
apt install -y restic
openssl rand -base64 32 > /root/.restic-pass && chmod 600 /root/.restic-pass
RESTIC_PASSWORD_FILE=/root/.restic-pass restic -r sftp:[email protected]:/srv/restic/web1 init
chmod 700 /root/backup.sh
echo '30 3 * * * root /root/backup.sh' > /etc/cron.d/restic

# weekly integrity check and a test restore
restic check
restic restore latest --target /tmp/restore-test --include /etc/nginx

Why is a copy on the same VPS not a backup?

Anything that destroys the server destroys the copy with it: a reinstall, a deleted server, an expired rental or an attacker with root. A reinstall from the client area erases the whole disk, and a server whose paid days lapse is kept for 7 days and then deleted. Keep the restic password outside the server too, in a password manager: without it, an encrypted repository cannot be opened by anyone, you included. Store the backup under credentials that the VPS can write to but not delete from where the destination allows it, so a compromised server cannot wipe its own history.

Is the hosted daily backup option enough on its own?

It covers the most common disaster, a broken or deleted server, with no work on your side; it is weaker for single files and long history. VPSRomania keeps seven daily copies of the whole server off the machine and restores them on request. That makes it the quickest way back after a bad upgrade. It does not keep last month's state, it is not encrypted with your own key, and it lives with the same provider as the server. For data you cannot lose, run restic as well, ideally to another city or another provider.

Where should the backup copy live?

In another place, under another account, ideally in another country. A small server in Reykjavik backing up one in Bucharest gives geographic and legal separation at the same plan price; the iceland vps page lists the sizes. Object storage over S3 works with restic too. Before a move, a fresh backup is the safety net described in migrate website to new vps, and reinstall or reboot explains what a reinstall wipes. According to VPSRomania's survey of 30 November 2026, the median monthly price of an 8 vCPU / 16 GB crypto VPS in Romania was $50.99 across 7 hosts; VR 16 costs $26.62, 48% less, and is rented month to month.

How often should a VPS be backed up in 2026?

Nightly for most servers, hourly for databases that take orders or payments. Ask how much work you would accept to lose: a blog can lose a day, a shop cannot lose an hour of orders. For busy databases, add point-in-time recovery with binary logs or WAL archiving on top of nightly dumps. Whatever the rhythm, monitor it: a script that fails silently for three weeks is a common surprise. Have the script write a timestamp and alert when it is older than a day, sending the alert through a relay on port 587, since outgoing port 25 is closed. Pair this with how to secure a linux vps.

VPS backup questions

What is the best backup tool for a Linux VPS?

restic or BorgBackup: both encrypt, deduplicate and keep versioned snapshots. restic also writes straight to S3-compatible storage.

How much space do VPS backups need?

With deduplication, seven daily and a few weekly snapshots of a typical website often fit in one to two times the data size. Media-heavy sites need more.

Can VPSRomania restore my server from a backup?

Yes, with the daily backups option: the team restores one of the seven copies on request. Without it, restores come from your own backups.

Should I back up the whole disk or only data?

Data and configuration are enough for most servers: a fresh image plus /etc, the web roots and the dumps rebuilds the system. Whole-disk copies suit complex setups.

What is a cheap off-site backup for a small VPS?

A second VR 1 or VR 2 in another city as an SFTP target for restic, from $4.82 a month, or any S3-compatible bucket.

Verdict
  • Dump databases, send encrypted restic snapshots off the server nightly, keep 7 dailies and test restores.
  • Add the hosted daily backups for a fast full-server restore; keep your own copy for history and independence.

Order a server with daily backups

VR 4 in Bucharest: 2 vCPU, 4 GB RAM, 80 GB NVMe for $9.08 a month; tick daily backups at checkout.

Sources (4)
  1. restic documentation: preparing a new repository — restic (read 30 Nov 2026)
  2. restic documentation: removing snapshots — restic (read 30 Nov 2026)
  3. mariadb-dump — MariaDB Knowledge Base (read 30 Nov 2026)
  4. Continuous archiving and point-in-time recovery — PostgreSQL Global Development Group (read 30 Nov 2026)

From $4.82/mo Bucharest, Reykjavik, Zurich

Deploy