:: setup backup mysql db on crontab
* 2 * * * :: every two o'clock in the morning
-pPASSWORD :: make sure no space after -p
--add-drop-table :: drop table if exist
| gzip -c :: create file compress .gz
:: links
+ googlelinux
+ abetobing
[ linux: ~ ]# crontab -e
* 2 * * * mysqldump -u MYSQLUSERNAME -pPASSWORD --host=localhost --add-drop-table DATABASENAME | gzip -9 > /home/backup/FILEBACKUP_`date --iso-8601`.sql.gz
* 2 * * * :: every two o'clock in the morning
-pPASSWORD :: make sure no space after -p
--add-drop-table :: drop table if exist
| gzip -c :: create file compress .gz
:: links
+ googlelinux
+ abetobing
Comments
Post a Comment