गाइड और ट्यूटोरियल

अपने बैकअप ऑटोमेट करें: 3-2-1 नियम

9 जुलाई 2024 को प्रकाशित · 10 मिनट में पढ़ें

यह लेख फ्रेंच और अंग्रेज़ी में उपलब्ध है।

The 3-2-1 rule

Three copies of your data, on two different media, one of them off-site. A VPS without a backup strategy is a matter of "when", not "if".

Level 1 — hypervisor snapshots

Included in our plans: an automatic daily snapshot of your entire disk. One-click restore from the panel. It's your ultimate safety net, but not enough alone: snapshots live on the same infrastructure as the VPS.

Level 2 — incremental rsync to a second VPS

A small Apex in another datacenter (Paris ↔ Frankfurt) makes an excellent backup server:

rsync -avz --delete --link-dest=/backups/current \
  -e "ssh -p 2222" /var/www/ backup@backup-server:/backups/daily-$(date +%F)
ln -sfn daily-$(date +%F) /backups/current

The --link-dest option creates incremental backups via hard links: each day looks complete, but only differences consume space.

Level 3 — external object storage

rclone to a compatible S3 (encrypted with rclone crypt) for the off-site copy:

rclone sync /backups encrypted-s3:my-backups --transfers 8

Databases: always a logical dump

Running rsync on MySQL files being written to gives you a corrupted database. Dump before copying:

mysqldump --single-transaction --quick prod | gzip > /backups/db-$(date +%F).sql.gz

PostgreSQL: pg_dump -Fc. SQLite: sqlite3 db .backup.

Cron and alerts

Put everything in a script, scheduled at 3 a.m., and send the result to a webhook (Discord, n8n): a backup that fails silently is worse than no backup. Test a full restore once a month — an untested backup doesn't exist.

हमारे इंजीनियरों द्वारा लिखित, हमारे इन्फ्रास्ट्रक्चर पर परखे गए चरण-दर-चरण ट्यूटोरियल।

GLOBALCLOUDHOSTING →