On Thu, Oct 07, 2010 at 09:09:19PM +0200, Petite Abeille wrote: > On Oct 6, 2010, at 5:50 PM, David Haymond wrote: > > If I copy, I don't want to transfer EVERY record to the server each time I > > sync, because that would be a waste of bandwidth. What is the best way to > > copy only those records that have changed to the server? > > Perhaps you could simply rsync the two files?
That only works for one-way synchronization, but for that rsync is probably a very good idea. For bi-directional synchronization things get messy because conflicts can arise that must get resolved. Since conflicts must get resolved (i.e., you can't raise exceptions, can't rollback, can't reject) you cannot handle them in the same way that you'd handle conflicts in the case of normal transactions. Dealing with uniqueness vilations here requires generating new values for some conflicting records. Dealing with RESTRICT foreign key violations requires either un-DELETEing rows or finding new rows to refer to, and so on. Worse, the conflict resolution must be done in such a way that the two DB copies end up having the same contents when you're done, so the conflict resolution must be deterministic regardless of where you're doing it. A general tool for hands-off bi-di synchronization of arbitrary DBs is not really feasible, not in a way that would satisfy most users. Such a tool would at minimum require plenty of schema-specific configuration to be acceptbale. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users