View Single Post
Old 02-18-2010, 07:39 PM   #17
jshoemaker
Junior Member
jshoemaker began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2009
Device: Linux Netbook w/calibre
Quote:
Originally Posted by sherman View Post
The main problem I see with the directory based sync method is problems with the metadata.db file. Basically, you can only have a metadata.db file from one library or the other at a time. Now this isn't much of a problem if both libraries are always in sync right from the beginning. However...

What happens when you start off with only having one calibre library. You then go away with your laptop for a couple of weeks, and while you're away you start a new libary on your laptop. This new libary may include SOME books that are in the main library, and some books that are new. When you get home, you want to add the new books into the main library. But how would you do this using directory based syncing...?
Well, I actually do this, but you're right, the one on the laptop was initially created as an exact mirror of the desktop, which is indeed necessary. I don't start a new library on the laptop, I just add books to it and reverse the rsync command when I get home. This takes the 'current' metadata.db and directory structure, and updates the desktop version to parity.

If you want to have separate instances entirely, for multiple people, the easiest way to do that would be to have a special export directory that holds copies of all books not currently added to both libraries. /home/wife/export/wife-outbox could contain the books the wife wants to share out, while /home/husband/export/husband-outbox on another machine contains the set the husband wants to share. As the export directory is updated via rsync, both will end up with a duplicate copy of this directory, with both 'outbox' subdirectories. If each adds the new book(s) to their calibre app, then deletes the relevant outbox directory files they just added, the data can be kept separate from the individual metadata db's, which will then be unique across systems, even though both will have all books.

This is not entirely automated, since a manual add/delete file is required at some point, but it's relatively painless despite that, and should work until calibre's planned sync tool is implemented.

Last edited by jshoemaker; 02-18-2010 at 07:43 PM.
jshoemaker is offline   Reply With Quote