← Centre d'aide/Déploiement

VPS Backup Strategies: From Manual to Fully Automated

Servers lose data in many ways: accidental deletion, failed upgrades, intrusions, disk failures. The only reliable insurance is a backup. This article presents three layers from easy to thorough — pick what fits.

Layer 1: platform snapshots (easiest)

A snapshot is a point-in-time "photo" of the whole disk; restoring rolls the entire machine back to that moment. Take one manually before big operations (OS upgrades, core config changes), or keep weekly automatic ones. Pros: complete and simple restores. Cons: coarse-grained — you cannot restore a single file. Contact 00Shark support to confirm snapshot availability on your plan.

Layer 2: scheduled file and database backups

Use cron to archive critical data daily. A minimal working approach:

  • Site files: archive the web root with tar;
  • Database: export with mysqldump (safer than copying raw database files);
  • Keep the last 7 days and auto-delete older archives so backups never fill the disk.

With aaPanel, the "Cron" page configures the same logic visually — no scripting required.

Layer 3: off-site backups (against major failures)

Backups stored on the same server die with the disk. Syncing them off-site completes the plan: push to another VPS with rsync, or to object storage / cloud drives with rclone. Follow the 3-2-1 rule: 3 copies, 2 media types, 1 off-site.

The most-skipped step: restore drills

A backup you have never restored is not a backup. Once a quarter, extract an archive into a test directory and import the database dump into a temporary database to confirm the data is intact. Many people discover only during a real incident that their backup script silently failed months ago.

Cet article a été rédigé avec l'aide de l'IA par l'équipe éditoriale de SharkCloud et relu avant publication.