How to backup MySQL database

Use mysqldump in a Cron Job

You can use a simple cron job to regularly backup the MySQL database used by Watch My Domains SED. Here is a simple bash script to backup the database to a date stamped file in /home/wmdsed/backup/ folder.

mysqldump -u xxxxxx -pyyyyyy --skip-lock-tables wmdsed > /home/wmdsed/backup/wmdsed_`date +%Y%m%d`.sql

Replace the xxxxxx with your database user name and yyyyyy with the database password. Remember to set the backup path also.

Use the download sample script

The latest versions of Watch My Domains SED has a sample script called db-backup-download-sample.php in the lib/php/custom/ folder.

You can use it from your browser to download a gzipped database dump to your hard disk. You may also use it along with wget to automatically download the database at regular intervals.