Looking at plone.org to find a way to periodically pack my instance's ZODB I could only find http://plone.org/documentation/faq/how-do-i-pack-the-zodb that doesn't talk about automated packs, but just manually initiated ones.
I know I can simulate the manual pack with wget or curl, but I'd like to know if that is the best practice in use for production sites.
If you are using ZEO you can add the following to your Crontab to do this:
If you don't want to do it manually, add this to your buildout.cfg and the crontab entry above will be added automatically when you run bin/buildout:
I do it like this (from https://raw.github.com/plock/pins/master/zeo):
If you do not use ZEO:
Use zeopack for ZEO (see other answers), and zodbpack for RelStorage (included, see RelStorage docs). Both are easy to set up.
wget -O/dev/null -q --post-data='days:float=10' --user=adminuser --password=password http://localhost:PORT//Control_Panel/Database/main/manage_pack
If you prefer wget.
You may want to check out collective.migrator. It has a pack_db recipe among others.