How to create automatic database backups (recommended) Print

  • 0

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

  1. Open phpMyAdmin
  2. Select your database
  3. Click Export
  4. Select Quick → SQL
  5. Download the backup

Method 2 — DirectAdmin full account backup

This option includes files + databases.

  1. Go to DirectAdmin → Create/Restore Backups
  2. Select Database
  3. Click Create
  4. 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

Was this answer helpful?

« Back