Hosting
Servers
Web Development Pricing
Resources
Get started → Log in
Home/Blog/VPS backup

VPS backup:
how to back up a VPS.

27 November 202610 min readBy the RapidServer team

How do you back up a VPS?

Back up a VPS in layers. Keep the provider's daily full-server backups for whole-server recovery, take a snapshot before any risky change, and send your own copy off the server every night: files with restic or rsync, databases with mysqldump or pg_dump, and Windows with Windows Server Backup to another machine. Keep three copies on two kinds of storage with one off-site, and test a restore every month.

Below is what every RapidServer VPS in Mumbai (BOM1) or Delhi NCR (DEL1) includes, then each layer with commands.

What every RapidServer VPS includes

From our VPS hosting plans and SLA clause 9, for Linux and Windows VPS, managed or unmanaged:

  • Daily backups, kept 7 days, free. An automated full-server backup runs every day and is kept for 7 days, included with every plan.
  • Snapshots on demand. Take one before a risky upgrade and roll back in minutes if it goes wrong.
  • Extended backups, optional. In the VPS configurator, Extended backups keep 30 days instead of 7, for 20% of the compute price.
  • Encrypted archives. Backup archives on storage we manage are encrypted at rest.

How restores work. Send a restore request through a client area ticket. The SLA sets a 24-hour Recovery Point Objective, so up to a day of changes can be lost, and an 8-hour Recovery Time Objective from when we accept a valid request. Each service gets 1 free restore request per calendar month; further restores may be charged, and you are told before work starts.

The SLA also says backups are a convenience, not a replacement for your own, and no backup is promised to be restorable.

VPS snapshot vs backup: the difference

A snapshot captures the whole server at one moment: a safety net for a change you are about to make, such as an OS upgrade or a Windows feature update. A backup is taken on a schedule and kept for a set time, so you can go back after a mistake, a failure or a bad deploy you noticed late. Your own off-server backup lives outside your hosting account.

SnapshotDaily backup (included)Your own off-server backup
When it's takenWhen you take itAutomatically, every dayOn your schedule, from cron or Task Scheduler
What it coversThe whole server at that momentThe whole serverThe files and databases you choose
How long it's keptShort term, until the change has proved itself7 days; 30 with Extended backupsAs long as you set
How you restoreRoll back in minutesRestore request: 1 free a month, 8-hour targetYourself, to any server
Best forUndoing a bad updateRecovering the server after a mistake or failureLonger history, account problems, moving providers

Use all three: they cover different failures.

The 3-2-1 backup rule

The 3-2-1 rule is a simple test for any backup plan: keep 3 copies of your data (the live copy plus two backups), on 2 kinds of storage, with 1 copy off-site.

For a VPS, that means the live server, the included daily backups, and a copy you control: a restic repository on another server, object storage or an office machine. The daily backups sit with the same provider and account as the VPS, so they aren't your off-site copy. Ideally, keep one copy the server itself can't change or delete.

Linux VPS backup: restic and rsync

restic is a free backup program that encrypts your data and keeps a history of snapshots on another server (over SFTP) or on S3-compatible object storage. As root (see SSH kya hai), run apt install restic on Ubuntu or Debian, set up SSH key login to the backup server, then create a password file and the repository:

shell
openssl rand -base64 32 > /root/.restic-pass && chmod 600 /root/.restic-pass
export RESTIC_REPOSITORY=sftp:backup@backup.example.com:/srv/restic-repo
export RESTIC_PASSWORD_FILE=/root/.restic-pass
restic init

For object storage, set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY and use a repository such as s3:https://s3.example.com/bucket_name. Keep the restic password off the server too: without it, the data can't be recovered.

Save this as /root/backup.sh, run chmod 700 on it and run it nightly from root's crontab, for example 30 2 * * * /root/backup.sh. It follows restic's backup and forget pages:

/root/backup.sh
#!/bin/sh
export RESTIC_REPOSITORY=sftp:backup@backup.example.com:/srv/restic-repo
export RESTIC_PASSWORD_FILE=/root/.restic-pass
set -e
mkdir -p /root/db-dumps
mysqldump --single-transaction --quick shop > /root/db-dumps/shop.sql
restic backup /etc /var/www /home /root/db-dumps
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune

set -e stops the script if the dump fails, so restic never stores a broken dump. The forget line keeps six monthly copies, a longer history than the 7-day server backups.

rsync copies a folder to another server over SSH; add -n first for a dry run:

shell
rsync -az --delete /var/www/ backup@backup.example.com:/srv/mirror/www/

With --delete it is a mirror: a file deleted or damaged on the VPS is deleted or damaged in the copy too. Use rsync for a second copy and restic for history.

Databases: mysqldump and pg_dump

Copying a live database's files can give a copy that won't start, so dump it instead. For MySQL or MariaDB, mysqldump with --single-transaction dumps InnoDB tables in a consistent state without blocking the site:

MySQL / MariaDB
mkdir -p /root/db-dumps
mysqldump --single-transaction --quick shop > /root/db-dumps/shop-$(date +%F).sql
mysqldump --single-transaction --all-databases > /root/db-dumps/all-$(date +%F).sql
mysql -e 'CREATE DATABASE shop_test'
mysql shop_test < /root/db-dumps/shop-2026-11-28.sql

For PostgreSQL, pg_dump exports consistently while the database is in use. Restore its custom format (-Fc) with pg_restore, and save roles with pg_dumpall --globals-only:

PostgreSQL
sudo -u postgres pg_dump -Fc shop > /root/db-dumps/shop-$(date +%F).dump
sudo -u postgres pg_dumpall --globals-only > /root/db-dumps/globals.sql
sudo -u postgres createdb shop_test
sudo -u postgres pg_restore -d shop_test < /root/db-dumps/shop-2026-11-28.dump

For large or busy databases, both projects point beyond dumps: see MySQL's notes on physical backups and PostgreSQL's backup chapter. Include /root/db-dumps in your restic backup.

Windows VPS backup

On a Windows VPS, use Windows Server Backup. It isn't installed by default: add it in Server Manager or with PowerShell, as Microsoft Learn shows, then run wbadmin start backup as Administrator:

PowerShell (as Administrator)
Install-WindowsFeature -Name Windows-Server-Backup
wbadmin start backup -backupTarget:\\backup-pc\vps1\mon -include:C:\Data -quiet
wbadmin start backup -backupTarget:\\backup-pc\vps1\full -allCritical -quiet

The first backup copies a data folder; -allCritical covers every volume Windows needs for a bare-metal recovery. That backup can't go to a volume it includes, so on a single-drive VPS, target a shared folder on another machine (add -user and -password if it needs a login). Microsoft warns that a new backup to the same shared folder overwrites the last one, so use a subfolder per day. wbadmin enable backup sets a schedule.

Reach the share over a VPN, never file sharing open to the internet, and limit Remote Desktop to your own IP addresses with the client area firewall (see our firewall guide). For TallyPrime, also keep Tally's own backups: how to use Tally on cloud.

Test your restores

A backup you have never restored is a hope, not a plan. Once a month, restore the latest restic snapshot to a scratch folder, load a database dump into a test database, and on Windows recover a folder to another path with wbadmin start recovery. restic check --read-data-subset=10% verifies a random 10% of the repository's data files (restic docs):

restore test
restic snapshots
restic restore latest --target /tmp/restore-test
restic check --read-data-subset=10%

Time each test, and keep the steps, the restic password and database logins somewhere you can reach when the server is down.

What backups don't protect against

  • Problems noticed too late. If malware or corrupted data goes unnoticed longer than your retention, every copy holds it. Server backups keep 7 days (30 with Extended backups), so keep monthly copies of your own.
  • Restoring an infected copy. A backup taken after a break-in brings the attacker back. Reinstall a clean image, restore only data from before the break-in, and change every password and key.
  • Mirrors and reachable backups. rsync --delete copies deletions, and anyone with root on the VPS can use the backup login stored there. Limit that login to its own folder and keep one copy the VPS can't reach.
  • Data leaks. A backup can't take back data that was stolen.
  • A service that has ended. Its data is kept for 30 calendar days for export, then the data and all backup copies are erased.

Want the server looked after for you? See managed vs unmanaged VPS; your off-server copy of important data stays your job either way.

A VPS with daily backups included.

KVM VPS in Mumbai or Delhi NCR with daily full-server backups kept 7 days and snapshots on demand, ready a few minutes after payment, from ₹581/mo plus 18% GST.

See VPS plans

Questions

Are backups included with a RapidServer VPS?+
Yes. Every VPS plan, Linux or Windows, includes a daily full-server backup kept for 7 days at no extra cost, plus snapshots on demand. Extended backups keep 30 days for 20% of the compute price.
What is the difference between a VPS snapshot and a backup?+
A snapshot captures the whole server at one moment, so you can roll back a risky change. A backup runs on a schedule and is kept for a set time, so you can recover from a mistake noticed later.
How do I restore my VPS from a backup?+
Roll back to a snapshot in minutes, or send a restore request through a client area ticket for a daily backup. The SLA target is 8 hours from when we accept a valid request, with 1 free restore request per service each calendar month.
Do I still need my own backups if backups are included?+
Yes. Our SLA calls included backups a convenience, not a replacement for your own, and doesn't promise that any backup is restorable. Keep an off-server copy and test a restore every month.
How do I back up a Windows VPS?+
Install the Windows Server Backup feature, then back up your data folders, or every critical volume with wbadmin start backup -allCritical, to a shared folder on another machine, using a subfolder per day.
What are the best VPS backup solutions?+
The provider's daily backups and snapshots plus your own off-server copy: restic or rsync for Linux files, mysqldump or pg_dump for databases, and Windows Server Backup on Windows. cPanel, Plesk and CyberPanel have backup tools too.
How often should I back up a VPS?+
At least daily, which the included backups already do. Dump busy databases more often, and take a snapshot before every big change.
VPS ka backup kaise le?+
Teen layer rakhiye: RapidServer ke daily full-server backups, jo har plan ke saath 7 din tak free milte hain, risky update se pehle snapshot, aur server ke bahar apni copy. Linux par restic, rsync aur mysqldump ya pg_dump chalaiye; Windows VPS par Windows Server Backup se doosri machine par backup lijiye. Har mahine restore test kijiye.

Daily backups included with every VPS.

KVM VPS with dedicated vCPU, NVMe and full root in Mumbai or Delhi NCR, daily backups kept 7 days and snapshots on demand, billed monthly in rupees with a GST invoice.