Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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

Beautiful concise statement from Andreas Jung:

Yes, you can not get a consistent snapshot of both the blob storage and the Data.fs. From the consistency point of view: using blob storage + Data.fs is broken-by-design :)

David Glick adds:

If you copy the Data.fs and then rsync the blobstorage, and make sure that the db doesn't get packed while that's happening, the backup should be fine. You may end up with some extra blobs that are not referenced by the Data.fs, but that's no big deal.

(From the thread at http://plone.293351.n2.nabble.com/question-about-using-repozo-and-blob-storage-td5016465.html )

The same goes for FileSystemStorage.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top