How to Back Up a VPS (2026)
Backups are the thing everyone skips until they lose data. A VPS does not back itself up automatically unless you set it up. Here are the practical approaches, from simple file backups to full server snapshots, and how to automate them so you do not have to think about it.
⚡ VPS with snapshot support from $5/mo — Use code LAUNCH2026 for 50% offApproach 1: Snapshots (Easiest)
A snapshot is a complete point-in-time copy of your entire VPS disk. If something goes wrong, you restore the snapshot and the server goes back to exactly how it was at that moment.
Galaxy Cloud Solutions includes a snapshot feature in the dashboard. Click Take Snapshot, give it a name, and you have a full backup. You can also set up automated scheduled snapshots to run hourly, daily, or weekly and keep the last N copies automatically.
The limitation of snapshots is that they can be large and expensive to store if you have a big disk. For a 20GB VPS, a snapshot is 20GB. For a 160GB VPS, it is up to 160GB.
Approach 2: File Backups With Rsync
Rsync copies files from your VPS to another location — a local machine, another server, or a storage provider. It is efficient because it only transfers what has changed since the last backup.
# Run this on your LOCAL machine to pull files from the server
rsync -avz --delete -e "ssh -p YOUR_SSH_PORT" ubuntu@your-vps-ip:/var/www/ ~/backups/vps/www/
This pulls your web files to your local machine. Add it to a cron job to run nightly:
crontab -e
0 2 * * * rsync -avz --delete -e "ssh -p YOUR_SSH_PORT" ubuntu@your-vps-ip:/var/www/ ~/backups/vps/www/ >> ~/backups/rsync.log 2>&1
Approach 3: Database Backups
If you run a database, back it up separately. File backups of a running database can be inconsistent. Use mysqldump for MySQL:
mysqldump -u dbuser -p dbname > /tmp/backup-$(date +%Y%m%d).sql
Automate it with a cron job:
0 3 * * * mysqldump -u dbuser -pYOURPASSWORD dbname | gzip > /var/backups/db-$(date +\%Y\%m\%d).sql.gz
Keep 7 days and delete older files automatically:
0 4 * * * find /var/backups/ -name "db-*.sql.gz" -mtime +7 -delete
Approach 4: Offsite Backups With Rclone
Rclone syncs files to cloud storage like S3, Backblaze B2, Google Drive, or dozens of other providers. For a VPS, Backblaze B2 is popular because it is cheap ($0.006/GB/month) and fast:
curl https://rclone.org/install.sh | sudo bash
rclone config # Follow the prompts to add your storage provider
Then sync your backups offsite:
rclone sync /var/backups/ b2:your-bucket-name/vps-backups/
The 3-2-1 Rule
A good backup strategy follows the 3-2-1 rule: 3 copies of your data, on 2 different types of storage, with 1 copy offsite. For a VPS that means: the live server, a local snapshot or rsync backup, and an offsite copy on B2 or S3.
Automated snapshots included in every plan
Galaxy Cloud Solutions dashboard includes one-click snapshots and scheduled auto-snapshots. Set it up once and forget about it. Plans from $5/mo — use code LAUNCH2026 for 50% off.
Get Started