[ZODB-Dev] zodb conversion questions
Jürgen Herrmann
Juergen.Herrmann at XLhost.de
Wed Feb 6 14:05:44 UTC 2013
Hi there!
I hav a relstorage with mysql backend that grew out of bounds
and we're looking into different backend solutions now. Possibly
also going back to FileStorage and using zeo...
Anyway we'll have to convert the databases at some point. As these
are live DBs we cannot shut them down for longer than the
ususal maintenance interval during the night, so for maybe 2-3h.
a full conversion process will never complete in this time so
we're looking for a process that can split the conversion into
two phases:
1. copy transactions from backup of the source db to the destination
db. this can take a long time, we don't care. note the last
timestamp/transaction_id converted.
2. shut down the source db
3. copy transactions from the source db to the destination db, starting
at the last converted transaction_id. this should be fast, as only
a few transactions need to be converted, say < 1% .
if i would reimplement copyTransactionsFrom() to accept a start
transaction_id/timestamp, would this result in dest being an exact
copy of source?
source = open_my_source_storage()
dest = open_my_destination_storage()
dest.copyTransactionsFrom(source)
last_txn_id = source.lastTransaction()
source.close()
dest.close()
source = open_my_source_storage()
# add some transactions
source.close()
source = open_my_source_storage()
dest = open_my_destination_storage()
dest.copyTransactionsFrom(source, last_txn_id=last_txn_id)
source.close()
dest.close()
thanks in advance and best regards,
Jürgen Herrmann
--
>> XLhost.de ® - Webhosting von supersmall bis eXtra Large <<
XLhost.de GmbH
Jürgen Herrmann, Geschäftsführer
Boelckestrasse 21, 93051 Regensburg, Germany
Geschäftsführer: Jürgen Herrmann
Registriert unter: HRB9918
Umsatzsteuer-Identifikationsnummer: DE245931218
Fon: +49 (0)800 XLHOSTDE [0800 95467833]
Fax: +49 (0)800 95467830
Web: http://www.XLhost.de
More information about the ZODB-Dev
mailing list