[ZODB-Dev] Copying zodb's with relstorage
Shane Hathaway
shane at hathawaymix.org
Thu Feb 10 09:41:27 EST 2011
On 02/10/2011 06:30 AM, Santi Camps wrote:
> I was trying to move a database copy a relstorage zodb and having some
> issues. The original zodb is mounted using a mount point /original_path
> If I restore the backup of the database and mount it using exactly
> the same mount point /original_path in the destination zope, all goes
> right. But what I want is to replicate the original database N times,
> so need to have /destination_pathN in the mount point. When I do that,
> the database seems empty (no object is shown in the mounted point).
The normal way to copy objects in ZODB is through ZEXP export and
import. Have you tried that? Also, what is your goal?
> Is there any way to fix this updating registers in SQL ? I know a way
> to solve it might be to export and import ZEXP, but the database is very
> big and I'm trying to avoid it I've tried these 2 queries but no effect
> obtained, these fields seems just informative:
>
> update transaction set description=replace(description::text,
> 'helpdesk_src', 'redesistemas')::bytea;
> update transaction set username=replace(username::text, 'helpdesk_src',
> 'redesistemas')::bytea;
The username and description in the transaction table affect only what
you see in the undo log. I don't think they have any connection with
the problem you are trying to solve.
> Where is stored the information about parent -> children objects ? Is
> the prev_tid field of object_state table ?
No. RelStorage stores all such information in pickles, just like
FileStorage or any other ZODB storage.
If you're using RelStorage because you expect to be able to access and
manipulate the object database using SQL, I'm afraid you will be
disappointed. All ZODB storages store pickles, and pickles are opaque
to SQL.
Shane
More information about the ZODB-Dev
mailing list