Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.4k views
in Technique[技术] by (71.8m points)

linux - Backing up (and restoring) a Plone instance

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...