[ZODB-Dev] Restoring from repozo and reusing an index file?

Paul Winkler slinkp at gmail.com
Fri Jun 11 11:48:47 EDT 2010


On Fri, Jun 11, 2010 at 10:34 AM, Hanno Schlichting <hanno at hannosch.eu>wrote:

> On Fri, Jun 11, 2010 at 3:25 PM, Paul Winkler <slinkp at gmail.com> wrote:
> > I'm preparing to move a zope site from one host to another. We've been
> > planning to use repozo backups to copy the filestorage from the old
> > host to the new one.  I'd like to figure out how to minimize downtime
> > while not losing any data.  My plan was:
>
> For moving stuff to a new host where a short downtime is planned
> anyways, I would just use rsync.
>
> 1. While the old site is still running, rsync both the Data.fs and
> index file to the new host
> 2. Make sure you don't run any zeopack operation between that point
> and the actual switchover
> 3. You can keep running rsync a couple times shortly before the
> downtime to get the most recent state over
> 4. Shut down the old site
> 5. Do a final rsync of both the .fs and .fs.index (this should take a
> couple seconds or minutes at most)
> 6. Start the new site, since the index is up-to-date and matches the
> Data.fs it should be seconds as well
>
> I tend to run rsync via "rsync -rP --rsh=ssh". The Data.fs is an
> append-only file, so rsync is very efficient at handling it. Only
> zeopack rewrites things all across the file and causes a subsequent
> rsync to be slow again.
>
>
Thanks. I'll do a trial run of this today.


> > 1) would it be safe to copy the index file from the old host and just
> > use that with the filestorage generated by repozo?
>
> It's save, but it will be ignored and a new index be created, so you
> don't gain anything.
>

Hm, ok, so whether you're right or Chris is right, it's not going to work :)


> But at some point you could upgrade to ZODB 3.10 (currently in beta),
> where repozo does save the index file for each backup. It will still
> be slower than rsync for this use-case, though.
>

Roger that. Thanks.
-- 
http://www.slinkp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zodb-dev/attachments/20100611/3fa005b2/attachment.html 


More information about the ZODB-Dev mailing list