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

Jim Fulton jim at zope.com
Wed Mar 21 10:06:25 EDT 2007


On Mar 21, 2007, at 9:59 AM, Tres Seaver wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jim Fulton wrote:
>> On Mar 21, 2007, at 6:41 AM, Chris Withers wrote:
>>
>>> Hi All,
>>>
>>> Is there any existing method or script for rolling back a ZODB
>>> (filestorage-backed in this case,
>>
>> Back end to what?
>>
>>
>>> if that makes it easier) to a certain point in time?
>>
>> Do you actually want to modify the file? Or do you simply want to
>> access it as of a particular time.
>> There is already a mechanism for opening a file storage as of a
>> particular time.
>>
>>
>>> eg: Make this Data.fs as it was at 9am this morning
>>>
>>> If not, I'll be writing one, where should I add it to when I'm done?
>>
>> Before we talk about adding it anywhere, I'd like to see the
>> semantics defined more clearly.
>
> Chris could:
>
>   1. Open the existing file in time-travel mode (readonly, so that it
>      loads no transactions later than the given point).  The 'stop'
>      parameter to the FileStorage initializer is the one which
>      triggers time-travel.
>
>   2. Open a new, writable filestorage.
>
>   3. Run 'copyTransactionsFrom' on the new storage, passing the old,
>      and then close the storages.
>
>   4. Restart his Zope with the new storage.

I wasn't asking about implementation.

Here are some questions:

- Should this create a new FileStorage? Or should it modify the  
existing FileStorage in place?

- Should this work while the FileStorage is being used?

- Should this behave transactional?

Jim

--
Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org





More information about the ZODB-Dev mailing list