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

2007-03-22 Thread Dieter Maurer
Chris Withers wrote at 2007-3-22 08:43 +: >Dennis Allison wrote: >And that I'm lazy and really want to be able to do: > >python rollback.py 2007-03-21 09:00 You have been told that you can specify a "stop" time and the storage will "stop" at the given time. Thus, you look at the code how this

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

2007-03-22 Thread Chris Withers
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 sta

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

2007-03-22 Thread Chris Withers
Jens Vagelpohl wrote: On 21 Mar 2007, at 17:29, Chris Withers wrote: I'm hoping for some means to just lop transactions off the end of the Data.fs until I get to the point in time I want... Why don't you just record the exact size of your Data.fs before starting your migration and then trunca

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

2007-03-21 Thread Dieter Maurer
Jim Fulton wrote at 2007-3-21 10:06 -0400: > ... > >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 f

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

2007-03-21 Thread Dennis Allison
Chris, The ZODB is an append only file system so truncating works just find. I have used truncation occasionally to fix a coddled ZODB. You can use any of the standard tools (fsrecover, for example) to find the transactions and their dates. The position in the file is part of the fsrecover out

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

2007-03-21 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21 Mar 2007, at 17:29, Chris Withers wrote: I'm hoping for some means to just lop transactions off the end of the Data.fs until I get to the point in time I want... Why don't you just record the exact size of your Data.fs before starting you

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

2007-03-21 Thread Chris Withers
Laurence Rowe wrote: - Should this create a new FileStorage? Or should it modify the existing FileStorage in place? Probably create a new one (analogous to a pack). Seems safer than truncating to me. Nah, this is working on a copy of production data, not the real thing. Disk space is an iss

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

2007-03-21 Thread Chris Withers
Jim Fulton wrote: - Should this create a new FileStorage? No. Or should it modify the existing FileStorage in place? Yes. - Should this work while the FileStorage is being used? No. - Should this behave transactional? Not sure what you mean... in terms of being able to "undo the u

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

2007-03-21 Thread Chris Withers
Tres Seaver wrote: 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

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

2007-03-21 Thread Laurence Rowe
Jim Fulton wrote: 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? Probably create a new one (analogous to a pack). Seems safer than truncating to me. - Should this work while t

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

2007-03-21 Thread Jim Fulton
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?

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

2007-03-21 Thread Tres Seaver
-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