What this is
This guide explains common recovery paths for a VPS: restore a provider snapshot, or restore files and databases from backups.
What it is for
- Recover from broken updates or configuration mistakes
- Recover after accidental deletion
Prerequisites
- Access to your provider panel (for snapshots)
- Backup files stored safely (off-server recommended)
- Downtime window (restores often require it)
Option A: Restore from provider snapshot (fast rollback)
- Open provider panel
- Select the VPS and snapshot
- Run restore (read warnings: disk will be overwritten)
- Wait for completion
- Login via SSH and verify services
Option B: Restore from file backups (more control)
Step 1) Upload/copy backup archive to the server
Example using scp:
scp linux_files_backup.tar.gz USERNAME@YOUR_SERVER_IP:/home/USERNAME/
Step 2) Extract into a safe restore folder
sudo mkdir -p /tmp/restore
sudo tar -xzvf linux_files_backup.tar.gz -C /tmp/restore
Step 3) Copy files into place (carefully)
Example for nginx configs:
sudo cp -a /tmp/restore/etc/nginx /etc/
Warning: Copying configs can overwrite current settings. Review first.
Step 4) Restore databases (separately)
Example MySQL restore:
mysql -u appuser -p appdb < appdb_backup.sql
Final verification checklist
uptime
systemctl --failed
sudo systemctl status nginx --no-pager || true
sudo systemctl status apache2 --no-pager || true
sudo systemctl status mysql --no-pager || true
sudo ss -lntp
Then verify websites and applications from a browser.
Conclusion
Snapshots are the fastest rollback. Backups provide more granular control. The best strategy is to use both.