Merging 2 versions of a table, old with current, is it possible ?
-
Hello,
Do you know if I can “merge”, in my blog’s comments table, the data of a former backup ? A part of this old table backup is missing from the present table because of a failed sql import once month ago, and I’d wish to recover the missing comments.
I know this isn’t clear, I owe you an explanation :
The reason : my blog’s database evolves constantly, but one month ago I damaged my DB and had to restore a backup copy with phpmyadmin.
Unfortunately, I had overlooked the fact that my DB’s size had considerably grown since the last time I had to perform a backup (I export my database in zip format with phpmyadmin once per week), and phpmyadmin didn’t manage to import my whole DB.
The only solution I found at that time (I now use php scripts to backup and restore it), was to use a text editor to split my big .sql file into smaller .sql files, one per table, and ask phpmyadmin to load each of them separately. That worked… Or almost, the largest table had a problem.
The comments table was only partially imported by phpmyadmin, who froze during the import. A dozen attempts (preceded by a table deletion to start cleanly) failed to import the comments successfully, and seeing my blog still worked even if it had lost half of its comments, I gave up and went on with a crippled comments table.
One month later, I regret this choice, but since new comments were added afterwards, I don’t know what to do.By default, if I ask phpmyadmin to import an sql file into an already existing table, phpmyadmin refuses it, telling the table already exists.
Is there a way to merge in my current comments table the missing data from my former backup copy ?
I’m ready to split my comments table in any number of smaller sql files, once again with a text editor, if needed. Or I can make it with a php script.
But I don’t know at all if this is simply possible, to merge all data into an older comments table.Thank you if you can help me with that problem 🙂
Sabinou
- The topic ‘Merging 2 versions of a table, old with current, is it possible ?’ is closed to new replies.