[ZODB-Dev] RE: Corrupt db when trying to pack
Tim Peters
tim at zope.com
Mon Oct 4 14:18:09 EDT 2004
[Tim Peters]
>> For the future, take the recommended practices listed on the link above
>> to heart. For example, had you made daily backups all along, repairing
>> "impossible" corruption in the first 300MB of a 700MB FileStorage
>> probably would have been straightforward.
[Gerry Kirk]
> We do a nightly backup of the whole database. How does that make
> repairing easier?
As you learned at
http://zope.org/Wikis/ZODB/FileStorageBackup
a FileStorage changes only by appending new data. So, e.g., if you drop in
incompatible memory chips and that ends up corrupting data in the first
300MB of a 700MB FileStorage (which "should be" impossible, precisely
because a FileStorage changes only by appending), you can very likely
construct a new database that's in perfect shape by pasting together the
first 300MB from a good backup and the tail end (everything after its first
300MB) of your current database. That should work fine provided you haven't
packed since the backup.
> The only thing I can see doing is to run tests on the backup each night,
> to know if there is an issue or not, and deal with it right away.
That's about detecting damage, so is a different issue than repairing
damage. If I were you, yes, I'd run fstest and fsrefs on each nightly
backup too. This is catastrophe insurance, and like all such seems like a
waste of effort -- until a catastrophe occurs.
More information about the ZODB-Dev
mailing list