LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mysql: Restore backup but only differences (https://www.linuxquestions.org/questions/linux-server-73/mysql-restore-backup-but-only-differences-4175425262/)

pingu 09-02-2012 10:15 AM

Mysql: Restore backup but only differences
 
Situation is this:
We have a dedicated server "OLD" which we wanted to ditch in favour for a cloud-based server "ECS".
Everything was copied from OLD to ECS and we got it working.
After 2 weeks ECS crashed...
The hosting provider took a LOONG time to give us backups, we had to switch all our clients back to OLD before that.

So now our clients (we're talking Typo3-sites here) have made changes on ECS during the 2 weeks it ran, then on OLD after the crash.
Therefore I need to add data only for the period 27/7 -9/8 to the actual running database on OLD.

I have found a few commercial apps that claims they can do it, but first I'm looking for a free solution - we've already lost a lot of money in this crash...

It's data in one pretty large database that's most important, it contains around 15 Typo3-installations (yes, all in one database...)
The dumpfile is 150 MB.

All mysql-tools I've found and other tools like phpmyadmin seems to go for "all or nothing".
Any ideas?

chrism01 09-02-2012 07:10 PM

You'll need to talk to the guys at Typo3; they may(!) be able to help, but in general, unless all your recs (or at least all the key ones) are date/time stamped, I don't see how for a general backup/restore tool.
The problem with an automated DB Merge Op is to decide which 'version' takes precedence. After all, if you had to go back to previous DB, the users likely tried to re-insert, update lost recs, but they likely won't be exactly the same as the now-recovered ones.
Actually, in that case, it may be worth asking if you NEED to bring back the lost recs at all...

You could write some code yourself eg take a mysqldump (which is plain text) of each db and work out the differences using eg Perl.
You need to consider rules for:
1. new recs
2. amended recs
3. deleted recs

separately.


Good Luck.

Do let us know how you solved it.


All times are GMT -5. The time now is 12:34 PM.