Setup & operation
How do I back up a VPS properly?
Short answer
Follow the 3-2-1 rule: three copies, on two kinds of media, one off-site. In practice that means snapshots for quick rollback, plus an encrypted nightly backup with restic or Borg to a different jurisdiction, plus a restore you have actually tested. An untested backup is a hypothesis.
Back up the data, not the machine. Databases need a proper dump or a filesystem-consistent snapshot, not a naive file copy of a running data directory, which produces a corrupt copy that appears to succeed.
Encrypt before the data leaves the instance. restic and Borg both encrypt client-side, so the backup target — including ours — never sees plaintext.
- restic backup /srv --repo sftp:backup-host:/repo, with a password file
- Dump databases first: pg_dump or mariabackup, then back up the dump
- Keep at least one copy in a different jurisdiction
- Schedule a restore test quarterly and put it in a calendar
See also: Snapshot
7 answers in Setup & operation
- How do I connect to a VPS with SSH? Run ssh root@your-server-ip from any terminal on macOS, Linux or Windows 10 and later. Use the key you supplied at provisioning, or the password email…
- How do I secure a new VPS? Five steps cover the overwhelming majority of real-world compromises: key-based SSH with password authentication disabled, no direct root login, a def…
- How do I stop SSH brute-force attacks? Disable password authentication entirely — brute force against key-based SSH is not possible. Add fail2ban to reduce log noise, and consider moving SS…
- How do I set up a firewall on a VPS? Use nftables on modern Linux, or ufw as a friendlier front end. Set the default inbound policy to drop, allow established and related connections, the…
- Can I install any operating system on a VPS? On KVM, yes. OnionVPS provides templates for Ubuntu, Debian, AlmaLinux, Rocky, Fedora, Arch, Alpine, NixOS, FreeBSD, OpenBSD, Windows Server, Proxmox …
- Can I upload my own ISO? Yes, on every plan, at no cost and with no approval step. Upload the ISO from the panel or point us at a URL, attach it as virtual media, and boot fro…