Bobo: Help ! How do I restore my PickleDictionary to a version of 5 hours ago ? 
Author Message
 Bobo: Help ! How do I restore my PickleDictionary to a version of 5 hours ago ?

About 5 hours ago, something happened to our Bobo-base.

3 of our users were entering data at the same time.
Now, because Bobo uses a SingleThreadedTransactionManager,
I assume that I should have no fear.

However, something happened and, ever since, we have been
unable to access one of our Bobo-base Persistent objects
(one of the Bobo-bases's top containers; a mucho important one).

We need to be able to reverse to a version of 5 * 3600 seconds
ago (i.e. 5 hours).

interactive session using newpickle.Unpickler directly:
=======================================================
# python
Python 1.4 (Aug 16 1997)  [GCC 2.7.2]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

Quote:
>>> import newpickle
>>> f = open('dotsss3.db', 'r+b')      # my Bobo-base
>>> u = newpickle.Unpickler(f)
>>> x = u.load()

Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/usr/local3/lib/python/Bobo/newpickle.py", line 382, in load
    self.dispatch[key](self)
  File "/usr/local3/lib/python/Bobo/newpickle.py", line 420, in
load_string
    self.append(eval(self.readline()[:-1],
ValueError: embedded '\0' in string arg

test script that fails:
=======================
#!/usr/local/bin/python

from SingleThreadedTransaction import Persistent, PickleDictionary,
PersistentMapping

def main():
        db = PickleDictionary('/usr/local3/public/dotsss3/dotsss3.db')
        d = db['dotsss3']
        pc = d.patientCabinet
        print pc.creation_date

if __name__ == "__main__":
        main()

running the script:
===================
# ./test.py
Traceback (innermost last):
  File "./repair.py", line 12, in ?
    main()
  File "./repair.py", line 9, in main
    print pc.creation_date
  File "/usr/local3/lib/python/Bobo/PickleJar.py", line 122, in
__getattr__
    setstate(self)
  File "/usr/local3/lib/python/Bobo/PickleJar.py", line 402, in setstate
    try: state = unpickler.load()
  File "/usr/local3/lib/python/Bobo/newpickle.py", line 382, in load
    self.dispatch[key](self)
KeyError:

--
===============================================================
Alexandre Rousseau                  ToonBoom Technologies Inc.

Tel   : +1.514.278.TOON             Montreal (Quebec) H2T 1E4
Fax   : +1.514.278.BOOM             Canada
===============================================================



Sun, 23 Apr 2000 03:00:00 GMT  
 Bobo: Help ! How do I restore my PickleDictionary to a version of 5 hours ago ?

Quote:

> About 5 hours ago, something happened to our Bobo-base.

> 3 of our users were entering data at the same time.

Were they entering data through the web?  What style of publishing
(e.g. CGI, PCGI?) and what platform?

Quote:
> Now, because Bobo uses a SingleThreadedTransactionManager,
> I assume that I should have no fear.

This is true as long as you only have one process running at a time.
The latest version of Bobo uses file locks to assure that only
one process has opened the Bobobase at a time.

What is the version number of your SimpleDB module?

Quote:
> However, something happened and, ever since, we have been
> unable to access one of our Bobo-base Persistent objects
> (one of the Bobo-bases's top containers; a mucho important one).

> We need to be able to reverse to a version of 5 * 3600 seconds
> ago (i.e. 5 hours).

There are a couple of ways to do this.  I need to know what version of
SimpleDB you have before I can give more specific instructions.

Quote:
> interactive session using newpickle.Unpickler directly:

(snip)

Bobobases are not simple pickle files and cannot be read directly with
pickle.

If you want, you can make your Bobobase file available for FTP and
I'll take a look at it.

Jim



Sun, 23 Apr 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. you have had done it 2 or 3 year ago

2. How to identify the version of Expect installed in UNIX machines long time ago

3. OT: swen-filter version 5 - 100% matches over the last 24 hours for my mailbox

4. Help ! Using Bobo

5. Help: bobo newbie question?

6. Bobo: Someobject/help doesn't work

7. Help on doing help

8. Converting Dates to hours need help.

9. Help please! (string operation w/hour calculation)

10. Help on SAVE TO and RESTORE

11. Help restoring disk

12. HELP: restore my faith in Python

 

 
Powered by phpBB® Forum Software