[ZODB-Dev] Re: roll back filestorage zodb to a certain date?

Chris Withers chris at simplistix.co.uk
Thu Mar 22 04:43:46 EDT 2007


Dennis Allison wrote:
> The ZODB is an append only file system so truncating works just fine.

Yup, but it's finding the location to truncate back to that's the 
interesting bit.

And that I'm lazy and really want to be able to do:

python rollback.py 2007-03-21 09:00

> You can use any
> of the standard tools (fsrecover, for example) to find the transactions
> and their dates.

OK, so I guess that might be a good place to start...

> The position in the file is part of the fsrecover
> output.  Pick a date and truncate the Data.fs to the specified position
> and you should be good to go. You'll want to kill all the index files
> before you take the truncated file live to ensure they get rebuilt on 
> restart.

Yup.

> Alternatively you could use Tres' technique--just add a new disk to your 
> system.  For a few hundred dollars you could have an additional 400GB!

As Jens will testify, these are servers in a corporate data centre and 
the last time we tried to get more disk added it took several months and 
I'd wager that it cost a lot more than a few hunderd dollars ;-)

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the ZODB-Dev mailing list