Welcome, Guest
Submit ComicRack bugs to get them squashed

TOPIC: Corrupt Database Backup File & Best Way to Recover

Corrupt Database Backup File & Best Way to Recover 6 years 7 months ago #22652

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 919
  • Thank you received: 189
  • Karma: 38
Not sure if this is an actual bug or not, though I thought I'd post this information here just to inform others in case they run into something similar.

Yesterday evening I went to open up the ComicRack for Windows app V0.9.153 64-bit running on Windows 7. For whatever reason, whether it be a bad previous ComicRack shutdown process or some corrupt Windows process, I was given a database error dialog and ComicRack stated that it was creating a new blank database and all configuration settings were reset as well.

I went to the folder where my database is stored for fear of losing all the data on my 75,000 entries and noticed the following file was created:
Corrupt Database Backup [4_25_2012 6_27_02 PM].xml

After a hour or so researching this file, I was finally able to open the file with WordPad. All apps that can open XML files were unable to open the file. Since my original file had grown to about 175MB in size, it took some time to open in WordPad. As far as I can tell, It looked as if the file was being updated (I assume the previous time I was closing ComicRack) and about 95% to 98% of the way through the update process, it somehow crashed and didn't complete writing data to the XML database file. It seemed to leave off 25% to 50% of the "ComicLists" node (my Smart Lists/Lists), the "WatchFolders" node (pointer(s) to where to find which folder(s) should be scanned for books), the "BlackList" node (I don't know what this is for), and the closing tag for the main "ComicDatabase" node.

So, even though this had me majorly concerned for obvious reasons, I was happy about the following:
  1. ComicRack completed majority of the updated XML file which meant my library was mostly salvageable in theory.
  2. ComicRack created a backup of the corrupted XML file instead of just completely starting over from scratch.
  3. I had created a backup of my database (though unfortunately it was several months ago).

With the three facts above, I decided to open the last good backup XML database file I had from November 2011 and copy the end of it to the end of the corrupted unfinished XML database file where it left off. I saved the file as a new XML database. I then opened up ComicRack again, and there I was looking at my somewhat recovered database. All the books seem to be there, and 50% to 75% of my Smart Lists/Lists seem to be there. It's probably going to take me months to verify if any books are missing, or if any recent metadata is missing. Plus it's going to take me some time to replace the many lists that I spent so much time creating. Also, it looks like all my personal config settings were reset (I'm assuming this was due to the "Config.xml" file being overwritten with no data as if ComicRack were first installed and the original config file not being backed up automatically as well) so this is mostly a minor setback, but something to point out.

The most important thing to recover from this situation is to have at least one working backup of your database on hand. Then as long as a corrupted file was created as it was for me, you can just append data from the last good copy to the end of the unfinished corrupted copy. If you don't have a previous good backup copy of your database, then you'll just have to append the unfinished corrupted copy with the proper ComicRack XML closing tags and node sections so that ComicRack can read the file properly.

So, with all that being said and shared, the moral of this story is constantly backup your database & config ComicRack XML files (I would suggest at least once a week if you're constantly active making updates to your library, and no less than once every 2 to 3 months), whether you back them up manually or using the backup option in ComicRack.

A final thing to keep in mind is this took me ALL NIGHT, a good 6 hours or so to get this fixed with all the research involved and then time needed to go through the MANY LINES OF XML CODE in the files. So, if you do find yourself treading in similar waters please be prepared to have much patience, take your time and pay attention to details of the ComicRack XML syntax structure.

If anyone has any better ideas on fixing a corrupted database in this similar situation, please, post it here and let me know and I'll give it a try. Otherwise, I hope this solution that I'm mostly satisfied with helps others.

Thank you.
Last Edit: 6 years 7 months ago by oraclexview.
The administrator has disabled public write access.

Corrupt Database Backup File & Best Way to Recover 1 year 9 months ago #47044

  • BellyBlack
  • BellyBlack's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Are you looking for a good tool to repair your corrupted database backup file? As far as I am concerned, Data Recovery will be your good choice. It is the best and complete recovery software for computer & storage devices. I recovered my important data just last week. So now you also are able to recover corrupted files successfully by using this useful program.
The administrator has disabled public write access.
Time to create page: 0.234 seconds

Who's Online

We have 153 guests and 2 members online