Mysql - How to add mysqldump in cron, Mysql dump scheduler
How to add mysqldump in cron
I have set the below scheduler in our local environment to take backup of our staging Linux server. The cron job is set in our Linux environment.In order to add cron job for database using mysqldump use the following line,
* * * * * mysqldump -h hostname -u root -p passwrd database > /path to the sql file/
for eg, if you want to backup your database on every friday at 3.30AM, add the following cron job
30 03 * * 5 mysqldump -h 192.168.0.6 -u leon -p leon userdb > mydb_backup.sql
Backup scheduler to run multiple databases into a single backup as
10 15 * * 5 mysqldump -h 192.168.0.6 -u leon -p leon --databases userdb detailsdb > mydb_backup.sql
The topic on Mysql - How to add mysqldump in cron is posted by - Leon
Hope you have enjoyed, Mysql - How to add mysqldump in cronThanks for your time