Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-24-2018, 02:16 PM   #1
paai
Member
paai began at the beginning.
 
Posts: 12
Karma: 22
Join Date: Mar 2015
Device: kobo Aura
Databases with the same names

I have some calibre databases with the same name, but in different directory trees (actually they are the backups, but I cannot unmount the backup volume). Let us call them database A, B and C.

Now calibre shows database A from the 'live' directory, database B from the backup directory and, get this, shows two databases C, one live and one of the backup. I only found this after temporarily renaming the backup databases to A_1, B_1 and C_1 and it makes me very nervous, because changes I made to the live database may in fact be made to the backup, and got overwritten by the next backup.

If I can tell calibre that it should only find databases in the live directory, my problem would be solved, but how do I do that?

Thank you

Paai
paai is offline   Reply With Quote
Old 10-24-2018, 02:40 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,944
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
PAI
I take it, you are referring to SERVER.

IIRC that uses the quick launch list. Simply Remove Library those from the list. (That Delete does not touch the Libraries, only the menu item) You can NOT remove the current (in use) Library
Right-click the Library Icon: Remove Library:<select>
theducks is offline   Reply With Quote
Advert
Old 10-24-2018, 04:01 PM   #3
paai
Member
paai began at the beginning.
 
Posts: 12
Karma: 22
Join Date: Mar 2015
Device: kobo Aura
Quote:
Originally Posted by theducks View Post
PAI
I take it, you are referring to SERVER.

IIRC that uses the quick launch list. Simply Remove Library those from the list. (That Delete does not touch the Libraries, only the menu item) You can NOT remove the current (in use) Library
Right-click the Library Icon: Remove Library:<select>
Yes, but how do I know to which database a particular name in the list refers? The backup, or the live device?

Paai
paai is offline   Reply With Quote
Old 10-24-2018, 04:54 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,944
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by paai View Post
Yes, but how do I know to which database a particular name in the list refers? The backup, or the live device?

Paai
switch to one: select a book: Tap 'O': note the FULL path in explorers searchbar
theducks is offline   Reply With Quote
Old 10-24-2018, 04:57 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,662
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
If you hover the mouse on a book cover it will show the path to the cover.

The current library cannot be removed - i.e. it won't appear in the Remove libraries list.

Try creating symbolic links to the backup libraries with different names e.g. the symlink that references a backup of your Books library might be named BooksBackup. Then if you point calibre at a symlink to a library it will use the symlink name - so, you'd see a Books library, and a BooksBackup library.

BR
BetterRed is offline   Reply With Quote
Advert
Old 10-25-2018, 03:00 AM   #6
paai
Member
paai began at the beginning.
 
Posts: 12
Karma: 22
Join Date: Mar 2015
Device: kobo Aura
Is it possible that the problem lies in the fact that during the backup, the metadata.db gets backed up too?

I use Luckybackup with rsync on a Linux machine, and in theory the metadata.db in the live directory is always the same age or newer than the file in the backup. So that should work.

Now say, I made a mistake and changed the database in the backup tree. Now this metadata.db is newer and gets copied over the live one. Will it bring the pathnames of the backup with it and overwrite the pathnames in the live database? Thatwould explain a lot.

Paai
paai is offline   Reply With Quote
Old 10-25-2018, 04:05 AM   #7
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,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by paai View Post
Is it possible that the problem lies in the fact that during the backup, the metadata.db gets backed up too?

I use Luckybackup with rsync on a Linux machine, and in theory the metadata.db in the live directory is always the same age or newer than the file in the backup. So that should work.

Now say, I made a mistake and changed the database in the backup tree. Now this metadata.db is newer and gets copied over the live one. Will it bring the pathnames of the backup with it and overwrite the pathnames in the live database? Thatwould explain a lot.

Paai
I guess the obvious question is do you even want these backup copies of the library to even be visible in Calibre in the first place?

If not the simple solution is to use the Remove Library option from within Calibre. This does not actually touch the library files on disk - all it does is remove the link to that library from the Calibre GUI. As was mentioned the current library is not shown on that list so you cannot accidentally remove the pointer to the current library.

If you DO want these copies to be visible from within Calibre then you should give them different names.
itimpi is offline   Reply With Quote
Old 10-25-2018, 04:54 AM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,662
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by paai View Post
Is it possible that the problem lies in the fact that during the backup, the metadata.db gets backed up too?

I use Luckybackup with rsync on a Linux machine, and in theory the metadata.db in the live directory is always the same age or newer than the file in the backup. So that should work.

Now say, I made a mistake and changed the database in the backup tree. Now this metadata.db is newer and gets copied over the live one. Will it bring the pathnames of the backup with it and overwrite the pathnames in the live database? Thatwould explain a lot.

Paai
I suggest you configure Luckybackup/rsynch to maintain a one-way mirror of your library. Then it won't propagate any inadvertent changes you make to the backup library across to the live library.

If you want the backup library to be permanently accessible in calibre I recommend you give the backup library folder a different name to lessen the chances of you making inadvertent changes to it. Maybe Luckybackup/rsynch has a feature to facilitate that, or you could do it via pre-sync and post-sync script commands.

BR

Last edited by BetterRed; 10-25-2018 at 04:58 AM.
BetterRed is offline   Reply With Quote
Old 10-25-2018, 07:06 AM   #9
paai
Member
paai began at the beginning.
 
Posts: 12
Karma: 22
Join Date: Mar 2015
Device: kobo Aura
Quote:
Originally Posted by BetterRed View Post
I suggest you configure Luckybackup/rsynch to maintain a one-way mirror of your library. Then it won't propagate any inadvertent changes you make to the backup library across to the live library.
...

BR
Is that possible? I see only two possibilities: backup and synchronize. It says nothing about one-way mirrors, but it would solve my problem with calibre (and somme other databases).
paai is offline   Reply With Quote
Old 10-25-2018, 03:44 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,662
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by paai View Post
Is that possible? I see only two possibilities: backup and synchronize. It says nothing about one-way mirrors, but it would solve my problem with calibre (and somme other databases).
Never heard of Luckysync before, so I've no idea what it can do.

I suggest you find an alternative sync tool, ==>> Comparison of file synchronization software - Wikipedia

FWIW - I use Goodsync to mirror all my data. FreeFileSync, SyncToy and rsynch are also quite popular amongst the calibre user community.

BR
BetterRed is offline   Reply With Quote
Old 10-25-2018, 07:48 PM   #11
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by paai View Post
Now say, I made a mistake and changed the database in the backup tree. Now this metadata.db is newer and gets copied over the live one. Will it bring the pathnames of the backup with it and overwrite the pathnames in the live database? Thatwould explain a lot.
Paths stored in the Calibre database (metadata.db) are relative, not absolute so the only time changing the backup would affect paths is if you modify either author or title.

As for library name, afaik Calibre doesn't explicitly store the library name in the database. It just gets the library name from the directory/folder name where metadata.db is located.

I don't believe Calibre scans drives for libraries. By default, I believe it only shows libraries you explicitly added so you must have added your backup libraries to Calibre at some point.

If you mouse-over on the library name, it should show you the path in the status bar. I highly suggest you remove your backup libraries from Calibre or at least change their directory names so you don't make any accidental changes (I believe you can do the latter within Calibre via Rename library).

I use FreeFileSync which I believe has a Linux version. Highly recommended.
ilovejedd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic changing christian names and family names sjefclaassen Calibre 3 09-29-2017 06:59 AM
Switching databases plusunim Calibre 4 06-26-2014 12:14 PM
Synchronize databases parasit Library Management 12 12-20-2011 12:34 PM
Multiple Databases danchisum Calibre 1 07-29-2010 09:35 PM
Two calibre databases jjansen Calibre 2 02-11-2010 12:52 PM


All times are GMT -4. The time now is 03:45 AM.


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