View Single Post
Old 09-01-2012, 06:47 PM   #2
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,124
Karma: 5735944
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
One way of doing this might be by using symbolic links. I just did some experimenting on my computer. Seems to work fine. I might even use this for real...

I use Linux, but as I understand it symbolic links are available in Windows as well.

http://en.wikipedia.org/wiki/Symbolic_link

I mount / on a small but fast SSD and /home on very big slow mechanical disc.

I have my main Calibre Library in a folder on the slow disc:
/home/adoby/Calibre/main

The metadata is, as usual, stored in the file:
/home/adoby/Calibre/main/metadata.db

I have prepared a folder on the SSD, with the correct rights:
/opt/SpeedUp/adoby/Calibre/main

My goal is to have the metadata.db there, to make use of the much faster SSD, but to keep the books on the big slow mechanical disc.

I do it like this:

(I recommend that you make a good backup before you try this...)

cp /home/adoby/Calibre/main/metadata.db /opt/SpeedUp/adoby/Calibre/main
mv /home/adoby/Calibre/main/metadata.db /home/adoby/Calibre/main/metadata.db.bak
ln -s /opt/SpeedUp/adoby/Calibre/main/metadata.db /home/adoby/Calibre/main/metadata.db

Done!

The first line copies metadata.db to the SSD.
The second line moves the original metadata.db away, by adding .bak to the name.
The third line creates the symboic link.

So now I have metadata.db on the SSD, but as far as Calibre is concerned, it is still at the usual place. But since it really is a symbolic link, the faster metadata.db on SSD will be used.

I did some testing and everything seems to work fine. I am not sure about how much faster things are, but the GUI seems a little snappier. Could be my imagination...

I assume that this is rather unsafe. I am not sure what happens if you rename or move a library. Or if you use portable Calibre. Perhaps you will have good use for that backup...

If you have more Calibre Libraries, just repeat the process, and move each metadata.db to SSD and do a symlink back to the original place.

Last edited by Adoby; 09-01-2012 at 06:54 PM.
Adoby is offline   Reply With Quote