import cStringIO s=cStringIO.StringIO() after the same tables are defined for both dbs:
db2.export_to_csv_file(s) s.seek(0) db1.import_form_csv_file(s) On 28 Giu, 13:25, Avik Basu <[email protected]> wrote: > Hi, > > I'm trying to synchronize two databases that are similar but not > exactly the same. I would like to create two connections (db1 and > db2) and go through table by table to do the synchronization. > > db1 = DAL('sqlite://storage.db') > db2 = DAL('mysql://username:[email protected]/test_db', > pool_size=10, check_reserved=['mysql'], migrate=False, > fake_migrate=False) > > db1 is defined in db.py while db2 is a mysql database (created via > web2py) that already exists and has data in it. i'm trying to update > the data in db2 with the data in db1. What is a good way to deal with > this problem? > > Avik

