Overview
Regular database backups protect your website from data loss. You can generate backups manually or set up automatic backups using cron jobs.
Method 1 — Manual backup via phpMyAdmin
- Open phpMyAdmin
- Select your database
- Click Export
- Select Quick → SQL
- Download the backup
Method 2 — DirectAdmin full account backup
This option includes files + databases.
- Go to DirectAdmin → Create/Restore Backups
- Select Database
- Click Create
- Download your backup when ready
Method 3 — Cron job (automatic daily backups)
Create a folder for backups:
/backups/
Cron command example:
mysqldump -u username_dbuser -p'YOURPASSWORD' username_dbname \ | gzip > /home/username/backups/db-$(date +\%F).sql.gz
Method 4 — JetBackup (recommended)
Some hosting plans include JetBackup:
- Daily DB backups
- Restore points
- 1-click rollback
Recommendations
- Store backups off-server (Google Drive, Dropbox)
- Keep at least 7–14 days of backups
- Test your restore process regularly