备份(和恢复)Plone 实例
我在 Linux 下的主目录中有一个 Plone 安装。 ~/克隆
。 这是根据 Plone 网站上的默认发行版制作的。因此Plone编译了自己的python并与Zope捆绑在一起。
请告诉我,如果我想:
- 1)备份我的 Plone 实例中存储的全部数据;
- 2a) 在相同版本的 Plone 中恢复备份数据,但位于其他地方。
- 2b) 在(稍)新版本的 Plone 中恢复备份数据。
我想,也许备份整个 ~/Plone/zinstance
目录是个好主意,但我发现 /home/me/Plone/... 出现了数千次。 >,甚至在文件
zinstance/var/filestorage/Data.fs
(!!!) 中。这可以吗?
我找到了此资源,但它并不具体足够的。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
通常包含变量数据的唯一目录是 var/ 目录(数据、日志文件)。例如,parts/* 将被重新生成。
更简单的是,通常您只需要备份 var/filestorage/Data.fs 文件:该文件包含您的“ZODB”数据库以及所有克隆数据。如果您有一台全新的克隆机,则可能还有一个
var/blobstorage/
目录用于存储大文件(pdf、mp3 等):也请备份该目录。在新实例中恢复仅意味着复制 Data.fs(可能还有 blobstorage 文件)。实例是否较新或在服务器上等等都没有关系。我定期将服务器的 Data.fs 复制到本地硬盘以便于测试。
两大警告:
如果我说“只需备份 Data.fs 文件”,我假设您可以重建实例,尤其是您可以获取任何附加产品你安装了。基本上:使用 buildout.cfg (假设是最新的 plone 版本)并备份该配置文件。
“复制 Data.fs”:最好使用 bin/repozo 脚本进行备份。该备份可以处理增量备份(如果您愿意),并且可以在您的 plone 站点运行时安全地备份您的 Data.fs。最舒服的方法是将 collective.recipe.backup 添加到您的构建中,这样就可以您有一个填写了所有必要选项的
bin/backup
脚本。另请参阅 http://plone.org/documentation/faq/plone-backup-move
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 avar/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
Plone 包含可用于增量备份的“repoze”。
Plone includes "repoze" which you can use for incremental backups.
安德烈亚斯·荣格 (Andreas Jung) 优美简洁的陈述:
David Glick 补充道:
(来自 http 的线程: //plone.293351.n2.nabble.com/question-about-using-repozo-and-blob-storage-td5016465.html )
FileSystemStorage 也是如此。
Beautiful concise statement from Andreas Jung:
David Glick adds:
(From the thread at http://plone.293351.n2.nabble.com/question-about-using-repozo-and-blob-storage-td5016465.html )
The same goes for FileSystemStorage.
我刚刚将 Plone 4(现在已经很过时了,但我不愿意更新)迁移到了新服务器。本质上,我只需遵循以下指南:
https://4.docs.plone。 org/manage/deploying/copy.html
基本上只需迁移
filestorage
和blobstorage
中的所有内容就可以了。由于嵌套文件夹结构,blobstorage
会更加庞大,因此请确保花一些时间监视它。迁移后,我还不确定是否要进行小升级,因为我真的很害怕把东西搞坏。所以目前看来,不升级似乎仍然可以正常工作。
I have just migrated Plone 4 (quite outdated by now but I'm reluctant to renew) to a new server. Essentially, I just follow this guide:
https://4.docs.plone.org/manage/deploying/copy.html
Basically just migrating all those in the
filestorage
andblobstorage
would be fine.blobstorage
would be more voluminous with nested folder structure, so make sure you spend some time monitoring it.After migrating, I am not yet sure whether to do a minor upgrade because I'm really afraid of breaking things down. So for now, not-upgrade still seems to work fine.