◦ Comprehensive security
◦ 24/7 support
VPS → Backup
How to backup a VPS
Backing up your VPS might not sound exciting—until something goes wrong. Whether you’re running a business site or hosting apps, a solid backup strategy is your safety net.
Let’s walk through how to create and automate reliable VPS backups using tools that actually work.
Get premium VPS hosting
High-performance VPS hosting that delivers unrivaled power
VPS backups: what you need to know before you start
Before diving into methods, get familiar with the key concepts that shape a smart VPS backup strategy:
- Full vs. incremental backups: Full backups copy everything, while incremental ones only save the changes since your last backup. Most setups benefit from a mix.
- Snapshot vs. file-level backups: Snapshots copy the entire system state, while file-level backups just target data. Snapshots are fast, but file-level backups are easier to move and restore elsewhere.
- Local vs. offsite: You always want at least one copy off your VPS—cloud storage, remote server, or even an external drive.
- Frequency and retention: Common strategies include daily or weekly backups with a 7- to 30-day retention window, depending on how often your data changes.
1. Use cPanel or WHM to back up your VPS
If your VPS uses cPanel or WHM, you’ve already got solid backup tools at your fingertips.
How to back up with cPanel
- Log into cPanel and head to Backup Wizard.
- Choose a full or partial backup (like home directory, databases, or email).
- Download the archive and store it locally or offsite.
This is a good manual option for quick backups or when you don’t have WHM access.
How to configure backups in WHM
- Log into WHM and go to Backup Configuration.
- Enable backups and choose your settings:
- Type: compressed or uncompressed
- Schedule: daily, weekly, monthly
- Retention: how many old backups to keep
- Remote storage: SFTP, Amazon S3, or custom destinations
- You can even customize backups by account.
WHM is ideal for automated, full-server backups with built-in restore points.
2. Automate Linux VPS backups with rsync or tar
No control panel? No problem. For Linux servers, command-line tools offer total control.
Rsync with cron
Rsync mirrors files from one location to another—perfect for offsite or incremental backups. Combine with cron to schedule jobs automatically
Example:
rsync -avz /var/www/ user@backupserver:/home/backups/myvps/
You can add logging, email alerts, or retention logic to your script.
Tar with cron
Tar is perfect for compressing large directories like /var/www or database dumps
Example:
tar -czf /backups/site-$(date +%F).tar.gz /var/www/
Automate with a cron job to run nightly or weekly. Compressed backups save space, but they’ll use more CPU during creation.
3. Back up a Windows VPS with built-in tools
If your VPS runs Windows Server, you can use Windows Server Backup (WSB):
- Open Server Manager → Add roles/features → Install Windows Server Backup
- Launch the WSB console and choose Backup Schedule
- Select full server or specific files
- Choose the destination: another volume, a network share, or external disk
WSB works well for small-to-medium workloads and supports daily backup automation.
4. Store backups offsite or in the cloud
Don’t keep all your backups on the same VPS. That defeats the point.
Popular offsite options:
- Cloud storage: Google Drive, Dropbox, Amazon S3, Backblaze B2
- Remote VPS or bare metal server: great for DIY cross-server backups
- External hard drive: useful for local archiving if you’re running backups from home or a physical office
Automate uploads with rclone
Install rclone on your VPS to sync files to cloud storage. Example command:
rclone copy /backups gdrive:vps-backups
You can also encrypt backups with rclone’s built-in support or use GPG beforehand.
5. Follow the 3-2-1 backup rule
For real peace of mind, follow the 3-2-1 rule:
- Keep 3 copies of your data
- Store them on 2 different media types (like disk and cloud)
- Make sure 1 copy is offsite
This strategy protects against human error, hardware failure, and disasters.
6. Test your VPS backups regularly
A backup is only useful if it actually works.
- Set up a test server or VM to try restoring files
- Test database backups by importing them into staging environments
- Don’t forget to verify file permissions, symbolic links, and app functionality
Add a restore check to your backup schedule if possible. Even once a month is better than never.
7. Choose the right backup format and retention period
How long you keep backups, and in what format, affects your storage and recovery time.
- Format: Use .tar.gz or .zip for compressed, portable files
- Retention: At minimum, keep 7 days of daily backups. Many site owners keep weekly/monthly snapshots for a year.
- Cleanup: Use a cron job or script to delete older backups automatically
(Make sure your retention policy aligns with your business or compliance needs.)
VPS backup FAQs
Next steps for backing up your VPS
A strong VPS backup strategy protects you from downtime, data loss, and disaster recovery headaches. Whether you’re using cPanel, rsync, or cloud sync, the key is consistency and offsite storage.
When you’re ready to upgrade your hosting to a high-quality VPS, Liquid Web can help. We’ve been leading the industry for decades, because our VPS servers are fast, cloud-based for easy scalability, and unbeatably reliable. Choose your favorite OS and the management tier that works best for you.
Click below to explore VPS hosting options or start a chat with one of our experts right now to learn more
Additional resources
VPS: A beginner’s guide →
A complete beginner’s guide to virtual private servers
Protect your VPS from DDoS attack →
9 steps to harden your virtual server
Expert tips for managing your VPS →
A complete guide to help you run your VPS with confidence