{"id":506,"date":"2011-08-04T03:42:44","date_gmt":"2011-08-04T13:42:44","guid":{"rendered":"http:\/\/mymonkeydo.com\/?p=506"},"modified":"2011-08-04T03:42:44","modified_gmt":"2011-08-04T13:42:44","slug":"mysql-auto-backup","status":"publish","type":"post","link":"https:\/\/mymonkeydo.com\/mysql-auto-backup\/","title":{"rendered":"MySQL Auto Backup"},"content":{"rendered":"
The following commands should be run daily. \u00a0This will give you a backup for 1 full month. \u00a0After 1 month the backups will overwrite the oldest files. \u00a0The %d is the day of the month.<\/p>\n
In your Hosting Dashboard -> Content -> Chron Manager, enter the following line as the command. \u00a0Replace <xxx> with the appropriate values.<\/p>\n
mysqldump --opt -Q -h <server_address><\/strong> --user=<username><\/strong> --password=<password><\/strong> <database_name><\/strong> > <your_path><\/strong>\/<database_name><\/strong>_`date +%d`.sql<\/pre>\nBlueHost:<\/h2>\n
In the CPanel -> Cron Jobs, enter the following line as the command. \u00a0replace <xxx> with the appropriate values.<\/p>\n
mysqldump --opt -Q -h localhost --user=<username><\/strong> --password=<password><\/strong> <database_name><\/strong> > \/<your_path><\/strong>\/<database_name><\/strong>_`date +%d`.sql<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[6],"tags":[11,24,51],"yoast_head":"\nMySQL Auto Backup - My Monkey Do<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n