[Zope] Packing the Data.fs with wget fails since 2.9.7

Maurits van Rees m.van.rees at zestsoftware.nl
Thu Jun 14 05:35:17 EDT 2007


Hi,

This blog entry shows how to use wget to pack the zope database, which
you can then put in a cronjob to call each day or week:

http://blogs.translucentcode.org/mick/2004/03/10/using_wget_to_pack_zope/

It is just one line:

wget -q http://username:password@YOURSITE.com:8080/Control_Panel/Database/manage_pack?days:float=0

But as a comment on that blog shows: this does not work anymore.  Zope
now requires that you visit that form using POST, which is not what
wget is doing automatically.  So you get an error in your event.log
like this:

2007-06-13T18:43:41 ERROR Zope.SiteErrorLog http://localhost:9080/Control_Panel/Database/manage_pack
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module <string>, line 3, in _facade
  Module AccessControl.requestmethod, line 52, in _curried
Forbidden: Request must be POST

I have tried adding POST data to the wget call.  Then you get this and
other variations:

wget -q --post-data='days:float=1&submit=Pack' \
http://user:password@localhost:8080/Control_Panel/Database/manage_pack

But that gives other errors:

Unauthorized: Your user account does not have the required permission.
Access to 'title_or_id' of (DatabaseChooser at
/Control_Panel/Database) denied. Your user account, Anonymous User,
exists at (unknown). Access requires one of the following roles:
['Manager']. Your roles in this context are ['Anonymous'].

For zeo I could use the bin/zeopack.py from the zope software home,
but not for non-zeo zope servers.

Does anybody know a solution?

-- 
Maurits van Rees | http://maurits.vanrees.org/ [NL]
            Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
 I can assure you mine are still greater."



More information about the Zope mailing list