Upgrading zope5

Hello,
I'm just wondering what is the best practice for upgrading zope 5.x to zope5.y if I install it with a buildout.cfg.

Thanks

Generally (for upgrading Plone in buildout) your goal is to either find and extend from your buildout.cfg a versions.cfg (set of pins) for your target version on dist.plone.org or download local copies of these Plone and Zope version pins to some local path of your choice in your own build. Once that is done, you can re-run buildout.

For just Zope pins, the process is just a subset of the above, but if you are updating to a newer Zope than extended by Plone's pins, you may need to keep your Plone versions.cfg locally.

I typically opt to download copies of the .cfg files and adjust the path/URL from which Plone's pins extend Zope's.

Giampiero Benvenuti via Plone Community wrote at 2024-5-21 10:53 +0000:

I'm just wondering what is the best practice for upgrading zope 5.x to zope5.y if I install it with a buildout.cfg.

One possible approach:
save the currently used ZODB storage and configuration files;
install whatever Zope version you like;
restore the storage and configuration files.

It is also possible to upgrade in place -- the exact
way depends on the installation method you have used
(buildout or pip).

Thanks for your hints. Just wondering if replacing the Data.fs on the new instance with the previous version and reset etc/zope.ini and etc/zope.conf on the new instance would be OK. What about Data.fs.lock, Data.fs.index and Data.fs.tmp?
Do I need to replace all of them? Thanks for your help.

If you have just the Data.fs, you do not need to copy these files over at all to your new environment. From my experience, having FileStorage re-create the index file from an existing Data.fs is quick — in many cases less than one minute.

Keep in mind, you likely also need to backup and copy over BLOB storage, in addition to your Data.fs.