The Cost of No Backups
Every year, thousands of websites are lost permanently due to:
- Server hardware failures
- Hacking and malware
- Accidental deletions
- Hosting provider issues
- Failed updates
A single backup can save months or years of work.
The 3-2-1 Backup Rule
- 3 copies of your data
- 2 different storage types (e.g., server + cloud)
- 1 offsite backup (different physical location)
What to Backup
Essential Files
- Website files (public_html or equivalent)
- Database(s)
- Configuration files (.htaccess, wp-config.php)
- SSL certificates (if custom)
- Email data (if hosted)
Backup Frequency
| Content Type | Frequency | Method |
|---|---|---|
| Static website | Weekly | Full backup |
| Blog/CMS | Daily | Incremental |
| E-commerce | Every 6 hours | Database: hourly |
| Critical SaaS | Real-time | Replication |
Backup Methods
1. Hosting Control Panel (cPanel)
- Full Backup: Download complete account backup
- Partial Backup: Home directory, databases, or email only
- Automated: Set up cron-based backups
2. Command Line (SSH)
bash
# Full site backup
tar -czf ~/backups/site-$(date +%Y%m%d).tar.gz public_html/
# Database backup
mysqldump -u user -p database > ~/backups/db-$(date +%Y%m%d).sql
# Compress database backup
gzip ~/backups/db-$(date +%Y%m%d).sql3. WordPress Plugins
- UpdraftPlus — free, supports cloud storage
- BackupBuddy — premium, complete solution
- All-in-One WP Migration — easy full-site export
4. Cloud Storage
Store backups in:
- Google Drive
- Amazon S3
- Dropbox
- Backblaze B2 (cheapest)
Automation Script
bash
#!/bin/bash
# Daily backup script
DATE=$(date +%Y%m%d)
BACKUP_DIR="/home/user/backups"
# Backup files
tar -czf $BACKUP_DIR/files-$DATE.tar.gz /home/user/public_html/
# Backup database
mysqldump -u dbuser -p'password' dbname | gzip > $BACKUP_DIR/db-$DATE.sql.gz
# Upload to cloud (using rclone)
rclone copy $BACKUP_DIR/files-$DATE.tar.gz remote:backups/
rclone copy $BACKUP_DIR/db-$DATE.sql.gz remote:backups/
# Remove local backups older than 30 days
find $BACKUP_DIR -mtime +30 -delete
echo "Backup completed: $DATE"Testing Your Backups
Warning
A backup you have never tested is a backup you cannot trust.
Test quarterly:
- Download a recent backup
- Set up a test environment
- Restore files and database
- Verify the site works correctly
- Document the restoration process
Conclusion
Backups are insurance for your website. Automate them, store them offsite, and test them regularly. When disaster strikes — and it will — you'll be glad you prepared.