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 09-08-2012, 03:15 PM   #1
ICDeadPpl
Junior Member
ICDeadPpl began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2010
Location: Sweden
Device: BeBook One
Question Library on Cifs share, DB on local disk?

I have a NAS with a cifs share, where I'd like to store the library (96 GB).
On my local computer I have an 128 GB SSD, which is why I don't want to store the libtrary on my local machine.
I read that you can have the DB location overridden, so I tried that.
I tried to override the DB location with this (Ubuntu 12.04):
Code:
Exec=env CALIBRE_OVERRIDE_DATABASE_PATH=/home/jan/Calibre calibre
Yet, when I start Calibre it throws an error:

Code:
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/library/restore.py", line 131, in load_preferences
    progress_callback=self.progress_callback)
  File "/usr/lib/calibre/calibre/library/database2.py", line 198, in __init__
    self.connect()
  File "/usr/lib/calibre/calibre/library/database2.py", line 146, in connect
    self.conn = connect(self.dbpath, self.row_factory)
  File "/usr/lib/calibre/calibre/library/sqlite.py", line 366, in connect
    raise DatabaseException(*conn.proxy.unhandled_error)
DatabaseException: unable to open database file
	RemoteTraceback (most recent call last):
	  File "/usr/lib/calibre/calibre/library/sqlite.py", line 248, in run
	    self.connect()
	  File "/usr/lib/calibre/calibre/library/sqlite.py", line 225, in connect
	    detect_types=sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES)
	OperationalError: unable to open database file
I also tried export CALIBRE_OVERRIDE_DATABASE_PATH=/home/jan/Calibre, but it just doesn't seem to "take" the env variable?

Or have I misunderstood the concept?
From the Calibre manual: CALIBRE_OVERRIDE_DATABASE_PATH - allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder. Useful if your library folder is on a networked drive that does not support file locking.

Wouldn't it be easier for everyone, if the setup wizard would let one (optionally) choose separate locations for the library and the database?
ICDeadPpl is offline   Reply With Quote
Old 09-08-2012, 03:25 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,820
Karma: 5006091
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Your env var has to have the full path to the metadata.db file not its containing folder.
kovidgoyal is offline   Reply With Quote
 
Enthusiast
Old 09-08-2012, 03:40 PM   #3
ICDeadPpl
Junior Member
ICDeadPpl began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2010
Location: Sweden
Device: BeBook One
Thumbs up Thanks!

Well, of course it's something too simple!
Thanks for the speedy reply!
ICDeadPpl is offline   Reply With Quote
Old 09-08-2012, 08:33 PM   #4
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,046
Karma: 3824376
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
I have a similar setup, only I mount my NAS using nfs. Ubuntu 12.04. And like you I have my metadata.db on a SSD.

But I symlink instead. That way I can have more than one Calibre library.

http://www.mobileread.com/forums/sho...d.php?t=189714
Adoby is offline   Reply With Quote
Reply

Tags
cifs, database errors, database locked, nas, samba

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metadata local and library remote OffColour Library Management 1 06-27-2012 04:43 AM
Kindle 2 and local library gin_ger Amazon Kindle 13 02-24-2010 10:16 PM
Classic Local library and Nook gin_ger Barnes & Noble NOOK 1 02-13-2010 01:19 PM
My local library is a MESS Lobolover Lounge 21 11-30-2008 02:45 PM
Trying out ADE file ebook from my local library ... RWJ Sony Reader 5 07-28-2008 03:03 PM


All times are GMT -4. The time now is 03:32 PM.


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