In this tutorial
- What does the daily backups add-on give you?
- How do you restore from the add-on?
- Why keep a second copy outside the server?
- What should go into your own backup?
- How do you set up restic to another server?
- How do you run it every night and prune old copies?
- What if you prefer borg or plain rsync?
- How do you prove a backup actually restores?
What does the daily backups add-on give you?
A daily copy of the whole instance, made without any software on your side. You switch it on during deploy, it costs 20% of the plan price, and the copies appear on the Backups tab of that server with their dates.
As an example, A2-4 (2 vCPU, 4 GB RAM, 100 GB NVMe) runs $14.40 a month, and the add-on brings $2.88 a month on top. The add-on is billed on the same invoice as the server for the same term, so a prepaid term covers both, paid once on-chain.
What the add-on is for: a bad upgrade, a deleted directory, a broken config, a compromised box you want to roll back. What it is not: a copy that lives outside our platform, and it is not something you browse file by file. That second role belongs to your own backups, covered further down.
How do you restore from the add-on?
Through a support ticket. Open the server, go to the Backups tab and note the date of the copy you want. Then open Support tickets in the console and write:
- the instance label and its IPv4 address from Overview,
- the backup date you picked from the Backups tab,
- whether anything on the current disk must be saved first.
Before you send it, copy off anything written since that backup, such as new uploads or recent database rows, because a full restore brings the disk back to the state on that date. After the restore, log in, check service status with systemctl --failed, and compare your data with what you expected.
Why keep a second copy outside the server?
Because every single location can fail you in some way. If the instance is destroyed, its term lapses unpaid past the removal date, or you reinstall it, both the disk and the server it belongs to are gone. A copy in another city, at home, or with another storage provider survives all of those. It also lets you restore a single file in seconds instead of a whole disk.
Aim for the usual pattern: at least one copy on a different machine, one in a different location, and one you have actually restored from in the last few months.
What should go into your own backup?
Data and the config needed to rebuild, not the whole operating system. A fresh image plus your files gets you back faster than an image-level copy.
/etcfor service configs, nftables rules, users and cron./homeand/rootfor keys, scripts and dotfiles./var/www,/srvor/optfor application files.- Docker volumes under
/var/lib/docker/volumes, or better, dumps from inside the containers. - A consistent database dump, never the raw data directory of a running database.
sudo mkdir -p /var/backups/db
sudo -u postgres pg_dumpall | gzip > /var/backups/db/pg-$(date +%F).sql.gz
sudo mysqldump --all-databases --single-transaction | gzip > /var/backups/db/my-$(date +%F).sql.gzHow do you set up restic to another server?
restic encrypts, deduplicates and talks to SFTP, so a second small instance in another city makes a good target. On the target, create a user bk and add the source key to its authorized_keys. On the source:
sudo apt-get install -y restic
sudo install -m 600 /dev/null /root/.restic-pass
openssl rand -base64 32 | sudo tee /root/.restic-pass >/dev/null
export RESTIC_REPOSITORY=sftp:bk@203.0.113.50:/srv/restic/node1
export RESTIC_PASSWORD_FILE=/root/.restic-pass
sudo -E restic init
sudo -E restic backup /etc /home /root /var/www /var/backups/dbStore a copy of /root/.restic-pass in your password manager. Without it the repository cannot be decrypted, by you or anyone else.
How do you run it every night and prune old copies?
A small script and a cron line are enough. Save as /usr/local/sbin/nightly-backup:
#!/bin/sh
set -eu
export RESTIC_REPOSITORY=sftp:bk@203.0.113.50:/srv/restic/node1
export RESTIC_PASSWORD_FILE=/root/.restic-pass
sudo -u postgres pg_dumpall | gzip > /var/backups/db/pg-latest.sql.gz
restic backup --quiet /etc /home /root /var/www /var/backups/db
restic forget --prune --keep-daily 7 --keep-weekly 4 --keep-monthly 6
restic check --read-data-subset=2%sudo chmod 700 /usr/local/sbin/nightly-backup
echo '40 3 * * * root /usr/local/sbin/nightly-backup >> /var/log/nightly-backup.log 2>&1' | sudo tee /etc/cron.d/nightly-backupThe check step reads a small random slice of the stored data each night, so silent corruption shows up early instead of on the day you need it.
What if you prefer borg or plain rsync?
Both are fine choices. borg is similar to restic, with compression and encryption, and needs borg installed on the target as well:
sudo apt-get install -y borgbackup
borg init --encryption=repokey-blake2 ssh://bk@203.0.113.50/srv/borg/node1
borg create --stats --compression zstd ssh://bk@203.0.113.50/srv/borg/node1::"node1-$(date +%F)" /etc /home /var/www
borg prune --keep-daily 7 --keep-weekly 4 ssh://bk@203.0.113.50/srv/borg/node1rsync makes a plain mirror with no history and no encryption, useful as a pull from a machine at home:
rsync -aHAX --delete --numeric-ids -e ssh root@198.51.100.24:/var/www/ /backup/node1/www/Pulling from home means the server never holds credentials for your backup box, which limits damage if the server is compromised.
How do you prove a backup actually restores?
Restore it somewhere else on a schedule. List the snapshots, pull one file and one database dump back, and open them.
sudo -E restic snapshots
sudo -E restic restore latest --target /tmp/restore-test --include /etc/nftables.conf
diff /etc/nftables.conf /tmp/restore-test/etc/nftables.conf && echo match
zcat /tmp/restore-test/var/backups/db/pg-latest.sql.gz | headOnce a quarter, go further: deploy a small instance, restore everything, start the services and load the site. That is the only test that tells you how long a real recovery takes.
Questions about this tutorial
How much do daily backups cost?
They add 20% to the monthly price of the plan, for example $2.88 a month on A2-4. The add-on is invoiced with the server for the same term.
Can I download a backup from the Backups tab?
The tab lists the available copies; restores are done for you through a support ticket. For files you can download yourself, keep your own restic or borg repository.
Are snapshots available?
No. On-demand snapshots are not offered. Use the daily backups add-on and your own copies, and take a fresh restic run right before risky changes.
Where should my own backups live?
Anywhere outside the instance: a second small instance in another city, a home server, or storage you already pay for. Encryption with restic or borg makes the location less sensitive.
Do backups continue if my term ends unpaid?
A paused server is removed 14 days after the term ends, and its add-on copies go with it. Keep off-server copies and pay the renewal invoice, which arrives 7 days before the end.