|
|
#1 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2009
Device: none
|
sqlite samba lock
Hi,
I'm tying to use calibre (0.4.143) using a samba share, but I receive an error from sqlite. I read that sqlite has problem with network shares: is there any way to keep all the *.db in my home directory and use the samba share only to store the library. I've modified the property database_path in the file .config/globay.py in order to point to my home directory. The library1.db is not created, instead the file metadata.db is created in the library directory (if I specify a local directory the file is populated with the db, if I use the share the file has only an 'S'). Any idea on how to solve the problem? Thanks Nicola |
|
|
|
|
|
#2 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Yes - you can have tight control over where aoll the Caliber files are located using a combination of Environment Variables and runtime switches. I use the following batch file on Windows:
Quote:
and a local (P metadata.db file. You will note I also specify where the Calibre Config information and Program Files are located as I do not use default locations for either. The other point is starting Calibre at BelowNormal priority as this keeps my system responsive without affecting Calibre performance significantly. You should be able to amend it to suit your particular requirements.If you are not using Windows it should be easy enough to translate it to the equivalent on your system. Last edited by itimpi; 09-26-2009 at 02:00 PM. |
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2009
Device: none
|
Thanks for your script. I forgot to say that I'm running ubuntu. This is the converted script:
Code:
#!/bin/dash # Batch File to start a Calibre configuration on Windows # giving explicit control of the location of: # - Calibe Program Files # - Calibre Library Files # - Calibre Config Files # - Calibre Metadata database # By setting the paths correctly it can be used to run: # - A "portable calibre" off a USB stick. # - A network installation with local metadata database # (for performance) and books stored on a network share CalibreConfig=/home/`whoami`/.config/calibre LIBRARY_DIR='/media/Nicola/Ebooks/' export CALIBRE_CONFIG_DIRECTORY=$CalibreConfig export CALIBRE_LIBRARY_DIRECTORY=$LIBRARY_DIR export CALIBRE_OVERRIDE_DATABASE_PATH=$CalibreConfig'/metadata.db' echo CONFIG=$CALIBRE_CONFIG_DIRECTORY echo LIBRARY=$CALIBRE_LIBRARY_DIRECTORY echo DATABASE=$CALIBRE_OVERRIDE_DATABASE_PATH calibre --with-library $LIBRARY_DIR The way I solved is to mount the share using the nobrl option: Code:
mount -t cifs -o nobrl //192.168.1.70/Nicola /media/Nicola |
|
|
|
|
|
#4 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Sep 2009
Device: none
|
I tried the script with a new version of calibre (0.6.13) and the script works, so there is no need to specify the noblr option. I changed the script in order to be able to share the same DB with different computers (no concurrent access, but hey!)
Code:
#!/bin/dash # Batch File to start a Calibre configuration on Windows # giving explicit control of the location of: # - Calibe Program Files # - Calibre Library Files # - Calibre Config Files # - Calibre Metadata database # By setting the paths correctly it can be used to run: # - A "portable calibre" off a USB stick. # - A network installation with local metadata database # (for performance) and books stored on a network share CalibreConfig=/home/`whoami`/.config/calibre LIBRARY_DIR='/media/Nicola/Ebooks/' export CALIBRE_CONFIG_DIRECTORY=$CalibreConfig export CALIBRE_LIBRARY_DIRECTORY=$LIBRARY_DIR export CALIBRE_OVERRIDE_DATABASE_PATH=$CalibreConfig'/metadata.db' echo CONFIG=$CALIBRE_CONFIG_DIRECTORY echo LIBRARY=$CALIBRE_LIBRARY_DIRECTORY echo DATABASE=$CALIBRE_OVERRIDE_DATABASE_PATH cp $LIBRARY_DIR'/metadata.db' $CalibreConfig calibre --with-library $LIBRARY_DIR cp $CalibreConfig'/metadata.db' $LIBRARY_DIR'/metadata.db' |
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I had not spotted that you were using such an old version of Calibre. Most of the options in the script have been introduced quite recently - in fact the one to specify the location of the metadata.db file was new in 0.6.13.
|
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Kobo sqlite database | darkadept | Kobo Reader | 38 | 09-08-2013 09:12 PM |
| Sqlite database replacement instructions | pholy | Kobo Reader | 62 | 10-11-2012 10:19 AM |
| Koboreader.sqlite gundged | maxwelledison | Kobo Reader | 21 | 01-12-2011 09:24 AM |
| Kobo Database Browser - SQLite | JBlyth | Kobo Reader | 2 | 06-06-2010 10:27 PM |
| iLiad Samba/smbd/shared folder access to iLiad | ajnorth | iRex Developer's Corner | 12 | 02-29-2008 10:02 AM |