Reputation: 1608
Is there a way to update a mysqldump file? Let's say I created a dump file for a table that archive the data over 3 month old and remove those archived records from the original records. And I want to update that same file every week with the new data that expires and retaining the old archived records. I know there are some other way to do this with a more legit backup solution, but sadly I dont have much room here to play around with server configuration and such. Best thing I can do some corn jobs. Thanks for the input in advance.
Upvotes: 0
Views: 872
Reputation: 22350
The purpose of a database dump, or of any backup data, is to provide a snapshot of what the database looked like at a particular point in time so that if something catastrophic happens you can revert to that version of a database. If you make changes to the database and want a more up-to-date dump that reflects those changes, the solution is not to modify a dump you already created; rather, it is to make a new dump from the database. When you are satisfied, you can then delete the older dump if space constraints are acute.
Upvotes: 1
Reputation: 6429
Sounds like you want to make modifications to a secondary database rather than the actual dump file. I would suggest that route, then if you want backups of that secondary database you can take mysqldump's from that database.
Upvotes: 0