备份(和还原)Plone实例 [英] Backing up (and restoring) a Plone instance

查看:92
本文介绍了备份(和还原)Plone实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux下的主目录中安装了Plone. ~/Plone. 这是从其网站上的默认Plone发行版中获得的.因此,Plone编译了自己的python,并与Zope捆绑在一起.

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)备份曾经存储在我的Plone实例中的全部数据;
  • 2a)在相同版本的Plone中还原备份的数据,但该数据位于其他位置.
  • 2b)在(稍微)较新版本的Plone中恢复备份的数据.
  • 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.

我认为,仅备份整个~/Plone/zinstance目录也许是个好主意,但是即使在文件zinstance/var/filestorage/Data.fs (!!!)中,我也发现了成千上万次/home/me/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.

推荐答案

通常唯一包含变量数据的目录是var/目录(数据,日志文件).例如,parts/*将重新生成.

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

甚至更简单,通常只需要备份var/filestorage/Data.fs文件:该文件包含带有所有plone数据的"ZODB"数据库.如果您使用的是全新的plone,可能还会有一个var/blobstorage/目录用于存储大文件(pdf,mp3等):也将其备份.

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.

还原到新实例中仅意味着复制Data.fs(可能还有blobstorage文件).实例是较新的还是在服务器上等等都没有关系.我定期将服务器的Data.fs复制到本地硬盘上,以便进行更轻松的测试.

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.

两个重要警告:

  • 如果我说仅备份Data.fs文件",则假定您可以重建实例,尤其是可以使用已安装的所有附加产品.基本上:使用buildout.cfg(假设使用最新的plone版本)并备份该配置文件.

  • 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.

正在复制Data.fs":最好使用bin/repozo脚本进行备份.该服务器可以处理增量备份(如您所愿),并且可以在您的plone站点运行时安全地备份Data.fs.最舒适的方法是将 collective.recipe.backup 添加到您的建筑物中,为您提供了一个bin/backup脚本,其中填写了所有必需的选项.

"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.

另请参见 http://plone.org/documentation/faq/plone-backup -移动

这篇关于备份(和还原)Plone实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆