dennismonsewicz Posted March 13, 2009 Share Posted March 13, 2009 Is there anyway to write a cron job to back up a single mysql db table? I have found several scripts to backup an entire database but I just need to backup a single table Quote Link to comment https://forums.phpfreaks.com/topic/149252-cron-job-to-backup-a-single-mysql-db-table/ Share on other sites More sharing options...
DyslexicDog Posted March 13, 2009 Share Posted March 13, 2009 Could you modify the scripts you found to only backup one table? Quote Link to comment https://forums.phpfreaks.com/topic/149252-cron-job-to-backup-a-single-mysql-db-table/#findComment-783763 Share on other sites More sharing options...
JonnoTheDev Posted March 13, 2009 Share Posted March 13, 2009 Easy. Just use the mysqldump program. This can do entire databases, single tables, etc http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html Quote Link to comment https://forums.phpfreaks.com/topic/149252-cron-job-to-backup-a-single-mysql-db-table/#findComment-783768 Share on other sites More sharing options...
jcombs_31 Posted March 13, 2009 Share Posted March 13, 2009 Can't you just use mysqldump mysqldump -u -p database_name table_name > /backup/table.sql Quote Link to comment https://forums.phpfreaks.com/topic/149252-cron-job-to-backup-a-single-mysql-db-table/#findComment-783769 Share on other sites More sharing options...
dennismonsewicz Posted March 13, 2009 Author Share Posted March 13, 2009 thanks guys! I will give it all a try! I appreciate it! Quote Link to comment https://forums.phpfreaks.com/topic/149252-cron-job-to-backup-a-single-mysql-db-table/#findComment-783772 Share on other sites More sharing options...
dennismonsewicz Posted March 13, 2009 Author Share Posted March 13, 2009 ok so i used the code but is there anyway to not lock the db once it backs up? Quote Link to comment https://forums.phpfreaks.com/topic/149252-cron-job-to-backup-a-single-mysql-db-table/#findComment-784088 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.