[ZODB-Dev] Copying zodb's with relstorage

Shane Hathaway shane at hathawaymix.org
Thu Feb 10 12:34:03 EST 2011


On 02/10/2011 09:27 AM, Santi Camps wrote:
>
>
> On Thu, Feb 10, 2011 at 5:07 PM, Shane Hathaway <shane at hathawaymix.org
> <mailto:shane at hathawaymix.org>> wrote:
>
>     On 02/10/2011 08:42 AM, Santi Camps wrote:
>
>         The objective is to duplicate a storage using different mount
>         points.
>           For instance, if we have  Database1 -> mount_point_1 , create
>         Database2 and Database3 as copies of Database1 (using pg_dump &
>         pg_restore), and then mount them as mount_point_2 and mount_point_3
>
>
>     Yes, but why do you want to do that?  There might be a better way to
>     accomplish what you're trying to do, or perhaps what you're doing is
>     the right thing to do but there's some bug and you need to describe
>     why that bug is important.
>
>
> Well, the original is a base site I want to replicate to be used for
> different clients.  I often have done that using mount points and zexp's
> export/import, but was trying to do it copying the database to avoid the
> long and heavy import process.

I see.  I don't know why the database seemed empty, but even after you 
fix that, assuming you're using Plone or similar, you're going to face a 
deeper problem: the catalog(s) in each site use absolute paths.  To fix 
that, you will have to re-catalog everything in each site, which is 
probably the most expensive part of the ZEXP import.  In other words, I 
suspect you won't actually save any time with this method of copying.

Another possible solution is to shrink your template so that it's not so 
expensive to copy.

If I have understood correctly, then this question is independent of the 
ZODB storage--you would have exactly the same problem with FileStorage 
or ZEO.

Shane


More information about the ZODB-Dev mailing list