[ZODB-Dev] Packing BIG fat Data.fs
Bak @ kedai
kedai@kedai.com.my
Sun, 2 Sep 2001 15:09:09 +0800
-----Original Message-----
From: Steve Spicklemire <steve@spvi.com>
To: fritz.mesedilla@summitmedia.com.ph <fritz.mesedilla@summitmedia.com.ph>
Cc: Steve Spicklemire <steve@spvi.com>; Hannu Krosing <hannu@tm.ee>; Chris
Withers <chrisw@nipltd.com>; jim@zope.com <jim@zope.com>; zodb-dev@zope.org
<zodb-dev@zope.org>
Date: Friday, August 31, 2001 9:16 PM
Subject: Re: [ZODB-Dev] Packing BIG fat Data.fs
>
>Hi Fritz,
>
> I have a cron job, borrowing heavily from the rsync howto, that
>uses rsync to backup Data.fs and Client.py to pack the database.
here's a script with no error checking and stuff to pack using ZEO coolness.
collected from the lists.
-----------------------------------
#!/usr/bin/python
import os
zopedir = "/usr/local/Zope"
os.chdir(zopedir + "/lib/python")
try:
import Zope
app = Zope.app()
app.Control_Panel.Database.manage_pack()
get_transaction().commit()
app._p_jar.close()
except:
print" cant pack"
----------------------------------------
call it from a cronjob, every whatever day/hour/etc. pass days=day_num in
manage_pack to only pack certain days
is this any good, bad, dangerous, missing?
thanks