views:

271

answers:

2

Hello, everyone!

I have a Plone installation in my home directory under Linux. ~/Plone. This was made from a default distribution of Plone from its website. So Plone compiled own python and is bundeled with Zope.

Please tell me, which files are necessary to backup if I want to:

  • 1) Backup the whole data ever stored in my Plone instance;
  • 2a) Restore the backed-up data in a same version of Plone, but located elsewhere.
  • 2b) Restore the backed-up data in a (slightly) newer version of Plone.

I thought, maybe it's a good idea to just backup the whole ~/Plone/zinstance directory, but I found thousands of occurrences of /home/me/Plone/..., even in the file zinstance/var/filestorage/Data.fs (!!!). Can this be right?

I found this resource, but it's not specific enough.

+2  A: 

The only directory that normally contains variable data is the var/ directory (data, logfiles). parts/* will be re-generated, for instance.

And even simpler, normally you only need to backup the var/filestorage/Data.fs file: that one contains your "ZODB" database with all your plone data. If you have a brand new plone, there also might be a var/blobstorage/ directory for storing big files (pdf, mp3, etc): back that one up as well.

Restoring in a new instance just means copying the Data.fs (and possibly the blobstorage files). It doesn't matter if the instance is newer or on the server or so. I regularly copy my server's Data.fs to my local harddisk for easier testing.

Two big warnings:

  • If I say "just back up the Data.fs file", I'm assuming you can rebuild your instance, especially that you can get hold of any add-on products you installed. Basically: use that buildout.cfg (assuming a recent plone version) and back that one config file up as well.

  • "Copying Data.fs": better use the bin/repozo script to make your backups. That one can handle incremental backups (should you wish) and it can safely backup your Data.fs while your plone site is running. The most comfortable is to add collective.recipe.backup to your buildout, that gives you a bin/backup script with all the necessary options filled in.

See also http://plone.org/documentation/faq/plone-backup-move

Reinout van Rees
+1  A: 

Plone includes "repoze" which you can use for incremental backups.

Ivo van der Wijk