Restarting ZEO server after database copy?

I have a Zope instance that has a few mounted DBs, with each one hosting a single Plone site. To simplify, let's consider just having dbs db01 and db02. db01 already has a production site on it, while db02 is going to have repozo move over a Data.fs for a site I'm migrating.

I know I can do this by stopping the ZEO server and WSGI clients, repozo copying the DB (and rsync blobs), and starting up the processes again. But this causes downtime for the site on db01. Is there any way to avoid this?

One thing I've tried is this process:

  • Copy the Data.fs/blobs
  • Restart the ZEO server
  • Restart the WSGI clients 1 at a time (haproxy load balanced)

This limits downtime to the ~1s it takes to restart ZEO and seems to work. But I don't know enough about how ZEO works, am I risking corrupting the database(s) this way?

This should work safely. However, there is a risk of inconsistencies between Data.fs and blobs. In addition to that, the Data.fs might not matched the copied index file...so the ZEO server might perform a full ZODB/Data.fs scan for regenerating a proper ZODB index (file).

How would inconsistencies between Data.fs and blobs occur? Is that just if a write action is done after transfer, before restart?

Correct.