Re: packing directory storage
Stefano Maffulli <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Organization | mediatria |
| Message-ID | <1088158469.5428.79.camel@plusultra> |
On Wed, 2004-06-23 at 18:48, Toby Dickenson wrote:
> 2. Run this script (untested; debugging might be necessary)
>
> import time
> from DirectoryStorage.Full import Full as S
> from DirectoryStorage.Filesystem import Filesystem
> from ZODB.referencesf import referencesf as ZODB_referencesf
> fs = Filesystem('/var/lib/zope/var/dirstorage')
> storage = S(fs)
> # pack keeping 1 week of history
> storage.pack(time.time()-60*60*24*7,ZODB_referencesf)
I put this lines in a script called 'compatta_dirstorage.py' and called
it as in the following line:
root@altoforno:/var/lib/zope/DirectoryStorage_1_1_7# time python2.1 \
snapshot.py ../var/dirstorage/ - python2.1 ../compatta_dirstorage.py \
| tee compatta.log
this is the error I get:
Traceback (most recent call last):
File "../compatta_dirstorage.py", line 8, in ?
storage.pack(time.time()-60*60*24*7,ZODB_referencesf)
File "./DirectoryStorage/BaseDirectoryStorage.py", line 271, in pack
File "./DirectoryStorage/LocalFilesystem.py", line 386, in
enter_snapshot
DirectoryStorage.utils.DirectoryStorageError: Can not enter snapshot
mode: snapshot already in use by 'startup'
real 0m2.756s
user 0m0.330s
sys 0m0.410s
root@altoforno:/var/lib/zope/DirectoryStorage_1_1_7#
Should I run the script without entering snapshot mode? Consider that I
just finished running checkds.py under snapshot and I did not do
anything else.
regards
stef
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com