VPS Snapshots and Rollbacks: Your Safety Net for Server Changes

Published on

How to use VPS snapshots for safe experimentation. Covers snapshot strategies, automated backups, disaster recovery, and when to use snapshots vs regular backups.

Written by Jochem, Infrastructure Expert, 5-10 years experience in game server hosting, VPS infrastructure, and 24/7 streaming solutions. Read author bio →

A snapshot captures your entire VPS at a point in time. If something goes wrong, roll back to the snapshot. It's an undo button for your server.

Snapshots vs Backups

FeatureSnapshotFile Backup
CapturesEntire disk imageSelected files/databases
Speed to createSeconds-minutesMinutes-hours
Speed to restoreMinutesMinutes-hours
Storage costHigh (full disk copy)Lower (incremental possible)
GranularityAll or nothingIndividual files
Best forBefore major changesDaily protection

Use both. Snapshots for safety before changes, backups for daily protection.

When to Take Snapshots

ScenarioRisk LevelSnapshot Required?
Before OS upgradeHighYes
Before major software updateHighYes
Before configuration changesMediumRecommended
Before installing new softwareLow-MediumRecommended
Before running unknown scriptsHighYes
Regular daily schedule-If available

Snapshot Strategy

Pre-Change Snapshot

  1. Take snapshot
  2. Make change
  3. Test thoroughly
  4. If good: delete snapshot (save space)
  5. If bad: restore snapshot

Scheduled Snapshots

FrequencyRetentionStorage Need
Daily7 days7x disk size (max)
Weekly4 weeks4x disk size (max)
Monthly3 months3x disk size (max)

Manual Backup Script

If your provider doesn't offer snapshots, create your own backup system:

#!/bin/bash
BACKUP_DIR="/backup"
DATE=$(date +%Y%m%d-%H%M)

# Create backup directory
mkdir -p $BACKUP_DIR

# Backup web files
tar czf $BACKUP_DIR/www-$DATE.tar.gz /var/www/

# Backup databases
mysqldump --all-databases > $BACKUP_DIR/db-$DATE.sql

# Backup configurations
tar czf $BACKUP_DIR/etc-$DATE.tar.gz /etc/

# Remove backups older than 7 days
find $BACKUP_DIR -name "*.tar.gz" -mtime +7 -delete
find $BACKUP_DIR -name "*.sql" -mtime +7 -delete

echo "Backup completed: $DATE"

Schedule with cron:

0 2 * * * /root/backup.sh >> /var/log/backup.log 2>&1

Off-Site Backups

Never keep all backups on the same server. If the server dies, so do your backups.

To Remote Server

rsync -avz /backup/ user@remote-server:/backups/vps1/

To Object Storage

# Using rclone to sync to any cloud storage
rclone sync /backup/ remote:vps-backups/

Disaster Recovery Plan

ScenarioRecovery MethodTime
Bad config changeRestore snapshot5-10 minutes
Corrupted databaseRestore from SQL dump10-30 minutes
Hacked serverRestore snapshot + change all passwords30-60 minutes
Hardware failureDeploy new VPS + restore latest backup1-2 hours
Accidental file deletionRestore from file backup5-15 minutes

Recovery Checklist

  1. Assess what happened
  2. Decide: snapshot restore or selective file restore?
  3. If snapshot: restore and verify
  4. If selective: restore specific files/databases
  5. Test everything works
  6. Investigate root cause
  7. Prevent recurrence

Testing Your Backups

A backup you've never tested is a backup that might not work:

TestFrequency
Restore a random file from backupMonthly
Restore database and verify dataMonthly
Full server restore to test VPSQuarterly
Verify backup script is runningWeekly

Space-Node's VPS hosting uses NVMe SSD storage, making both snapshot creation and restoration fast. Combined with KVM virtualization, snapshots capture the complete machine state.

Jochem

About the Author

Jochem, Infrastructure Expert, expert in game server hosting, VPS infrastructure, and 24/7 streaming solutions with 5-10 years experience.

Since 2023
500+ servers hosted
4.8/5 avg rating

I specialize in Minecraft, FiveM, Rust, and 24/7 streaming infrastructure, operating enterprise-grade AMD Ryzen 9 hardware in Netherlands datacenters.

View my full bio and credentials →

Launch Your VPS Today

Get started with professional VPS hosting powered by enterprise hardware. Instant deployment and 24/7 support included.

VPS Snapshots and Rollbacks: Your Safety Net for Server Changes