Schedule Database Backup in cPanel using Cron Job

cpanel cron job database backup

Many of our web hosting customers in Pakistan have a query that how can they schedule database backup in cPanel using crong job. This post will help in creating schedules backups in two easy steps

Step 1: Login in your cPanel and click on Cron Job icon and Advanced section.

schedule database backup in cPanel using cron job

Step 2: Set time / frequency and add following command in text box

[su_code scroll=”0″]mysqldump –opt -Q -u dbusername –password=dbpassword dbname | gzip > /path-to-store-the-backup-file/db_backup.sql.gz[/su_code]

Note: Replace dbusernamedbpassworddbname path-to-store-the-backup-file

If you are using wordpress there are also different free plugins available to create daily backups but there is not guarantee or reliability of  such plugins. Therefore it is suggested to generate schedule database backups using cPanel cron job.

iWhost Pakistan offers free weekly offsite backups in all types of hosting which you can access through your cPanel account.


Leave your comment

Open chat
Need help?
AOA, How can we help you?
Enable Notifications OK No thanks