Quantcast
Channel: blog.azwan.net » cron job
Viewing all articles
Browse latest Browse all 2

Full mysql backup with cron job in cpanel

$
0
0

This is how to do daily mysql backup with cron job in cpanel. This cron job will backup your mysql database as dump file (and gzip) daily. The files will be replaced on the same day next week.

Command to run to dump your mysql database, gzip it and replace it the following week as follow

1
mysqldump -uDBUSERNAME -pPASSWORD --opt DBNAME > /home/USER/dbbackup/FILENAME.sql; gzip -f /home/USER/dbbackup/FILENAME.sql

Replace DBUSERNAME, PASSWORD, DBNAME, USER, FILENAME respectively.


Viewing all articles
Browse latest Browse all 2

Trending Articles