备份(和恢复)Plone 实例

发布于 2024-08-13 18:35:27 字数 615 浏览 10 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

与风相奔跑 2024-08-20 18:35:27

通常包含变量数据的唯一目录是 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 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

月牙弯弯 2024-08-20 18:35:27

Plone 包含可用于增量备份的“repoze”。

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

黎歌 2024-08-20 18:35:27

安德烈亚斯·荣格 (Andreas Jung) 优美简洁的陈述:

是的,你无法获得一致的
Blob 存储的快照和
数据.fs。从一致性来看
观点:使用blob存储+
Data.fs 的设计已被破坏:)

David Glick 补充道:

如果复制Data.fs然后rsync
blob 存储,并确保
数据库没有被打包,而那是
发生这种情况,备份应该没问题。
你可能会得到一些额外的斑点
没有被引用的
Data.fs,但这没什么大不了的。

(来自 http 的线程: //plone.293351.n2.nabble.com/question-about-using-repozo-and-blob-storage-td5016465.html

FileSystemStorage 也是如此。

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.

秋凉 2024-08-20 18:35:27

我刚刚将 Plone 4(现在已经很过时了,但我不愿意更新)迁移到了新服务器。本质上,我只需遵循以下指南:

https://4.docs.plone。 org/manage/deploying/copy.html

基本上只需迁移 filestorageblobstorage 中的所有内容就可以了。由于嵌套文件夹结构,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 and blobstorage 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文