Backup Best Practices for VPS Owners — VPSGrid Knowledge Base
English
EnglishBeta EspañolPortuguês (Brasil)Coming soonFrançaisComing soonDeutschComing soon
Client Area

Backup Best Practices for VPS Owners

KB-141, Backup Protection, VPSGrid, unmanaged 0 found helpful

Backup Best Practices for VPS Owners

Unmanaged VPS — You Own Backups

VPSGrid provides KVM infrastructure and power controls. Guest data backup is your responsibility unless a separate managed backup product is explicitly purchased and documented in your account.

Short answer

On an unmanaged VPS, follow the 3-2-1 rule: three copies of data, on two media types, with one offsite. Automate file and database backups, test restores regularly, and keep encryption keys separate from the server.

Overview

A VPSGrid virtual server can be rebooted, reinstalled, or compromised independently of billing status. Hypervisor-level power actions do not roll back filesystem changes inside your guest OS. Without backups, a single mistaken rm -rf, failed OS upgrade, or ransomware event can permanently destroy production data.

Backups are not optional hygiene — they are part of operating an unmanaged VPS alongside How to Configure UFW Firewall on Ubuntu/Debian and Fail2ban Setup on VPSGrid Linux VPS on day one.

3-2-1 backup strategy on VPSGrid VPS 3-2-1 Backup Strategy on VPSGrid 3 copies of data 2 different media 1 offsite copy Production VPS → local backup → offsite/object storage VPSGrid does not retain guest filesystem snapshots by default on unmanaged plans Test restores quarterly — backups you cannot restore are not backups
Diagram: Keep three copies, two media types, and one offsite backup for VPSGrid VPS workloads.

What to back up on your VPS

Application files

Web roots (/var/www), application repositories, uploaded media, configuration templates, and TLS private keys (stored securely). For WordPress, back up wp-content at minimum; for custom apps, include deployment directories and environment files excluding secrets from unencrypted archives when possible.

Databases

MySQL/MariaDB, PostgreSQL, Redis persistence files, and any embedded SQLite databases. Database dumps should be consistent — use native dump tools during low-traffic windows or with brief read locks for critical tables.

Configuration and secrets

Nginx/Apache vhosts, PHP-FPM pools, systemd unit files, cron tables, firewall rules, and SSH authorized_keys. Store secrets in a password manager; backup encrypted copies separately from public repositories.

Backup methods for VPSGrid VPS

Manual snapshots via tar and rsync

Quick manual backup before risky changes:

sudo tar -czf /root/manual-backup-$(date +%F).tar.gz /var/www /etc/nginx
sudo rsync -avz /root/manual-backup-*.tar.gz user@backup-server:/backups/vpsgrid/
Warning

Verify tar paths carefully. Archiving / or wrong directories can fill disk or capture unnecessary data. Test restores on a staging VPS before relying on archives in production.

Automated cron jobs

Schedule database dumps and file sync during low-traffic hours. Combine separate jobs for databases (hourly) and files (daily) to balance RPO and disk I/O.

Secure database dump credentials

Store MariaDB/MySQL credentials in ~/.my.cnf (mode 600) instead of embedding passwords in crontab — plain-text passwords in cron appear in process lists and expose credentials.

[client]
user=backup_user
password=SECURE_PASSWORD
chmod 600 ~/.my.cnf
0 2 * * * mysqldump --defaults-extra-file=$HOME/.my.cnf --all-databases | gzip > /backups/db-$(date +\%F).sql.gz

On MariaDB 10.6+, mysqldump is typically a symlink to mariadb-dump — either command produces portable logical exports. Official references: restic and BorgBackup for encrypted offsite tooling.

Warning — rsync --delete

The --delete flag removes files on the destination that no longer exist on the source. Verify sync direction before scheduling — reversing host paths can wipe your only offsite copy.

For file trees, rsync to an offsite host over SSH is common on unmanaged VPS plans:

0 3 * * * rsync -az --delete /var/www/ [email protected]:/backups/vpsgrid-www/

Offsite object storage

S3-compatible tools (rclone, s3cmd, restic, borgbackup) upload encrypted backups to geographically separate storage. Encryption at rest protects backups if object storage credentials leak.

Recommended backup schedule

Daily incremental file sync captures changes since last run. Weekly full archives provide recovery points if incremental chains corrupt. Retention of 7 daily, 4 weekly, and 3 monthly copies balances storage cost with recovery flexibility.

Document Recovery Point Objective (RPO) — maximum acceptable data loss — and Recovery Time Objective (RTO) — maximum downtime while restoring. Ecommerce workloads often target RPO under one hour for databases.

Testing restores

Untested backups fail during real incidents. Example drill: restore Tuesday's wp-content tarball and database dump to a staging VPS, confirm WordPress loads, and record elapsed time against your RTO target.

Quarterly restore drills should:

  1. Provision a staging VPS or use local VM
  2. Restore latest database dump and verify row counts
  3. Restore files and confirm application boots
  4. Measure time-to-recovery against RTO targets
Restore Drill Checklist
  • Document restore steps in your runbook
  • Verify backup encryption keys are accessible
  • Confirm DNS cutover plan if restoring to new IP
  • Review Point Your Domain to a VPSGrid VPS if IP changes

Backup security best practices

Encrypt backups containing credentials or customer data. Restrict offsite bucket permissions with least privilege. Rotate backup SSH keys separately from production admin keys. Monitor backup job logs — silent cron failures are a common cause of false confidence.

Do not store the only backup copy on the same VPSGrid VPS as production. Disk failure or reinstall destroys co-located archives.

Troubleshooting backup failures

SymptomLikely causeFix
Cron never runsWrong user crontab or cron service stoppedCheck systemctl status cron (Debian/Ubuntu) and crontab -l
rsync permission deniedSSH key or path permissionsVerify key on backup server, test manual rsync
Disk full during backupLocal /backups grew too largeSee disk cleanup guides; rotate old archives
Database dump emptyWrong credentials or socket pathTest mysqldump manually; check .my.cnf permissions

If hypervisor or network issues prevent backup transfers but the VPS is otherwise healthy, confirm service status in the client area and review VPS Not Accessible — Troubleshooting Guide. VPSGrid support does not restore guest files for you on unmanaged plans — see Security Responsibilities on Unmanaged VPS.

Next steps

After defining strategy, implement automated database backups (Batch 3 companion guide) and document restore procedures before loading production data. Browse Linux VPS plans if you need additional staging capacity for restore testing.

Authoritative cancellation and data retention terms appear at vpsgrid.net/legal. Knowledgebase articles summarize operational best practices but do not override legal documents.

Backup tooling comparison

rsync excels at incremental file synchronization to another Linux host over SSH — common for WordPress wp-content trees and configuration directories. restic and borgbackup add deduplication and encryption for object storage targets. mysqldump / mariadb-dump remain the baseline for logical SQL exports portable across minor version upgrades.

Snapshot-style backups at the hypervisor level are not a substitute for file-level backups you control unless your product explicitly includes scheduled snapshots documented at checkout. On unmanaged VPSGrid plans, assume you must orchestrate guest-level backups yourself.

Version control for configuration

Store Nginx vhosts, systemd units, and deployment scripts in private git repositories. Application code backups complement — but do not replace — database dumps. Tag releases before risky migrations so you can revert code independently of database state.

Ransomware and credential rotation

If a VPS compromise is suspected, rotate all credentials (database, SMTP, API keys) after restore from a known-clean backup. Attackers often persist web shells outside web root — scan restored files or rebuild from known-good sources.

Monitoring backup jobs

Send cron output to a monitored mailbox or logging service. Silent failures are worse than noisy alerts — configure MAILTO in crontab or wrap scripts with explicit success/failure exit codes logged to syslog.

Offsite bandwidth planning

First full rsync of large media libraries can take hours. Schedule initial seed overnight and use incremental runs afterward. Monitor VPSGrid bandwidth usage if your plan includes transfer considerations documented at checkout.

Immutable backups

Object storage versioning or WORM policies protect against ransomware encrypting backup objects. Evaluate provider features when storing business-critical archives.

Legal retention

Business records and customer data retention requirements vary by jurisdiction. Document how long backup archives are kept and how secure deletion is performed when retention expires. Authoritative terms remain at vpsgrid.net/legal.

Container volume backups

If using Docker, back up named volumes explicitly — containers are ephemeral but volumes persist data. Stop write-heavy containers briefly for consistent snapshots when vendors require quiet periods.

Documentation handoff

Store restore runbooks where on-call engineers can access them if primary admins are unavailable. Include VPSGrid client area login recovery paths without storing passwords in runbooks.

Backup encryption keys

Store restic or Borg repository passwords in a password manager separate from the VPS. Losing the key equals losing the backup even when archives exist offsite.

Frequently Asked Questions

Does VPSGrid provide automatic VPS backups?

Standard unmanaged VPSGrid plans do not include automatic guest filesystem backups managed by VPSGrid. You are responsible for backing up application files, databases, and configuration inside the VPS. Always confirm your specific product features at checkout on vpsgrid.net.

How often should I back up my VPSGrid server?

Production sites typically use daily automated backups with weekly full snapshots and monthly restore tests. High-change ecommerce or database workloads may require hourly database dumps plus nightly file sync.

Where should I store offsite backups?

Use a separate provider or account from your VPSGrid server — object storage (S3-compatible), another VPS, or secure NAS. Offsite copies protect against datacenter issues, accidental deletion, and ransomware on the primary server.

How do I restore after an OS reinstall?

Reinstall wipes the local disk. Recovery requires offsite backups created before reinstall. See How to Reinstall Your Operating System for reinstall behavior and plan restores before destructive actions.

Related Articles

Need more resources?

Looking for a VPS optimized for production VPS workloads with reliable backups? Explore Linux VPS plans at vpsgrid.net.

Need migration assistance? Open a support ticket with your service ID and steps already tried.

Need More Help?

Search this knowledgebase for related guides. If the issue persists, open a ticket at billing.vpsgrid.net with your service ID, primary IP, and steps already tried. See What Information to Include in a Support Request and Security Responsibilities on Unmanaged VPS for scope and required details.

Was this answer helpful?

Related Articles