Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2011, 07:16 AM   #1
parasit
Member
parasit began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2009
Location: Warsaw, Poland
Device: Kindle, IPhone 3G, Sony Clie
Synchronize databases

Hi,
I use Calibre on two, sometimes three computers. The main library I have at home, but on the laptop I have a full copy. The problem arises when being away from home adds new files. If there are several, the problem is not large. But if there are more and something in the main library was changed, it become troublesome.

Is there a tool to synchronize two (or more) libraries?
I mean mostly about adding new files and update the changed ones.
If not, I think I might try to write them myself, maybe be useful to someone.

BR
Parasit Hendersson
parasit is offline   Reply With Quote
Old 12-20-2011, 07:36 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by parasit View Post
Is there a tool to synchronize two (or more) libraries?
I mean mostly about adding new files and update the changed ones.
If not, I think I might try to write them myself, maybe be useful to someone.
Richcopy should work fine for updating from the main library to the secondary libraries. Check out this post.
DoctorOhh is offline   Reply With Quote
 
Advertisement
Old 12-20-2011, 08:09 AM   #3
parasit
Member
parasit began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2009
Location: Warsaw, Poland
Device: Kindle, IPhone 3G, Sony Clie
Quote:
Originally Posted by dwanthny View Post
Richcopy should work fine for updating from the main library to the secondary libraries. Check out this post.
Although I use Ubuntu and Mac, but I understand how it works. I can use rsync for example, the question whether it would not lead to inconsistency in the database?
parasit is offline   Reply With Quote
Old 12-20-2011, 08:18 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by parasit View Post
Although I use Ubuntu and Mac, but I understand how it works. I can use rsync for example, the question whether it would not lead to inconsistency in the database?
rsync should work fine, I would advise that calibre be shutdown on both machines during the sync. Also the sync needs to be one way from the master library to the secondary libraries.
DoctorOhh is offline   Reply With Quote
Old 12-20-2011, 08:38 AM   #5
parasit
Member
parasit began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2009
Location: Warsaw, Poland
Device: Kindle, IPhone 3G, Sony Clie
Quote:
Originally Posted by dwanthny View Post
rsync should work fine, I would advise that calibre be shutdown on both machines during the sync.
This is clear
Quote:
Originally Posted by dwanthny View Post
Also the sync needs to be one way from the master library to the secondary libraries.
This is problem, i need full sync.
Usually i add new files on laptop, but sometimes my wife adds some files on home PC. The same problem appear when i want exchange files with my friends.

I think about tool which compare both databases and adds files/db entrys on both machines. I found in forum thread how gain acces to database and rest should be easy
parasit is offline   Reply With Quote
Old 12-20-2011, 09:04 AM   #6
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,104
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
If you know what date range is involved, then the easiest thing would be to sort on one instance into date added order and then use Calibre's ability to copy books between libraries for those that are involved. Not foolproof, but does not need any new capability.
itimpi is offline   Reply With Quote
Old 12-20-2011, 09:08 AM   #7
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@parasit - noooooo - you are heading down a path to disaster. Remember that the path to a calibre book includes a numerical id that represents the calibre book id, incremented and unique to the database. What do you think is going to happen when your wife adds book #100 "Foo" and you add book #100 "Bar", since you are both trying to add to the same base database?

All of the FAQ threads and posts around the place are all there for a reason. Calibre is a single user database. Synchronising it between a laptop and another machine is fine provided you only ever add/rename books on one of those machines, and then do a full sync before making changes on the other machine and vice versa. You *cannot* make changes on both simultaneously and then expect to be able to merge the two together again.
kiwidude is offline   Reply With Quote
Old 12-20-2011, 09:54 AM   #8
parasit
Member
parasit began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2009
Location: Warsaw, Poland
Device: Kindle, IPhone 3G, Sony Clie
Quote:
Originally Posted by kiwidude View Post
@parasit - noooooo - you are heading down a path to disaster. Remember that the path to a calibre book includes a numerical id that represents the calibre book id, incremented and unique to the database. What do you think is going to happen when your wife adds book #100 "Foo" and you add book #100 "Bar", since you are both trying to add to the same base database?
I understand how it works, but i want the same titles not the same db structure.
Want use a "tool" to compare databases but add books by default methods.
Eg. if in DB1 is Frank Foobarsky "Foo" (100) and in DB2 is Bob Barfoosky "Bar" (100).
I need to do:
1. Generate lists (authors, titles, isbn, etc) from both DB's (in read only mode)
2. Copy missing titles to any tmp dir
3. Add all copied files to db. Even calling "calibre /tmp/foo.epub", although it is probably a better method.

Finally i got all titles on both machines, but with different ID's.
DB1 - Foo (100), Bar (101)
DB2 - Bar (100), Foo (101)

Quote:
Originally Posted by kiwidude View Post
You *cannot* make changes on both simultaneously and then expect to be able to merge the two together again.
When use this method i can add files on both machines simultaneously.
parasit is offline   Reply With Quote
Old 12-20-2011, 10:01 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by parasit View Post
When use this method i can add files on both machines simultaneously.
Let us know how it turns out.
DoctorOhh is offline   Reply With Quote
Old 12-20-2011, 11:28 AM   #10
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@parasit - My comments were in relation to the previous suggestions on this thread, discussing the likes of robocopy, rsync etc. It sounded like you intended to sync the directories and then modify the database, which isn't going to work for the reasons I outlined.

As for what you have now described, I think you are still going to have a lot of issues. For instance your original post mentioned updates, not just additions. What do you do when books are renamed, by a title/author/series change? Or a new version that is under a different id? I think you are pushing the proverbial uphill but my only intent was to warn you that it is not a trivial exercise in case you wasted a lot of time finding that out for yourself

My personal recommendation would be that instead of trying to compare the databases with external tools etc, that you instead just put a shared directory that you use Save to Disk with, one for you, one for the wife. So when you add a book yourself to your library, you then use Save to Disk to put it in the shared directory that your wife can then do an import from, and vice versa. Setup your automerge options to replace an existing version. You will still get caught out if one of you renames an author/title name, but you can catch that with Find Duplicates plugin.

Stick the shared directories on something like Dropbox, and job done. It is how I share books with friends/family - they just perdiodically import into Calibre from the shared folder specific to them and remove the books from it when done.
kiwidude is offline   Reply With Quote
Old 12-20-2011, 12:56 PM   #11
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
Quote:
Originally Posted by kiwidude
that you instead just put a shared directory that you use Save to Disk with, one for you, one for the wife.
A good tip, but how do you manage to transport the metadata to the other Calibre database this way?
I mean the informations that might not be included in the file (e.g. cover, auhors, date, etc.).
Loeffel is offline   Reply With Quote
Old 12-20-2011, 01:23 PM   #12
Terisa de morgan
Wizard
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 2,401
Karma: 2236104
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Aura, Kobo Mini, Kobo Aura HD, iPhone, iPad, Galaxy Tab3 8
I'm more rude My calibre library is directly into the dropbox directory, but it works because only one user updates it at any moment, and I don't start calibre at the "slave" directory without syncronizing
Terisa de morgan is offline   Reply With Quote
Old 12-20-2011, 01:34 PM   #13
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Loeffel - under Preferences->Saving books to disc, make sure you have "Save cover separately" and "Save metadata in OPF file" checked.

Then the person importing the books should make sure they use the "Add books from directories including subdirectories (One book per directory)" option on the Add menu (the second option). That will use the metadata exported into the opf file which is the complete set.
kiwidude is offline   Reply With Quote
Reply

Tags
database, synchronize

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Calibre databases and/or folders? FF2 Calibre 6 12-18-2010 09:22 PM
How to merge Calibre databases? Partner Calibre 3 11-09-2010 12:19 PM
Multiple Databases danchisum Calibre 1 07-29-2010 10:35 PM
Multiple databases using the same book files JanuaryF Calibre 5 03-28-2010 12:40 PM
Two calibre databases jjansen Calibre 2 02-11-2010 01:52 PM


All times are GMT -4. The time now is 02:13 PM.


MobileRead.com is a privately owned, operated and funded community.