- Install calibre in desktop pc, building my ebooks library
- Move default Calibre's repository to another place i.e.: calibre-repo
- Add the books as much as you want.
- Copy folder calibre-repo to the a remote server
- Use rsync program to synchronize the repository between a desktop (which always add a new book from here) and the remote serverCommand lineTo sync/copy the refresh repository data to the remotersync -r -a -v -e "ssh -l
" :/remote/path /local/path - On remote server I'm starting calibre server with this command
calibre-server --daemonize --auto-reload --pidfile=$HOME/calibre.pid --port=8012 --with-library=$HOME/calibre-repos
headless start, background process no need the GUI environment. - After first deployment, whenever I want to update the remote's repository I will execute the command in #5
- For sure, I will restart the calibre process;(#6)
- To restart the calibre process use
kill -9 `cat HOME/calibre.pid`
then execute the command in #6 again
Reference:
$rsync -r -a -v -e "ssh -l
from: http://www.cyberciti.biz/tips/linux-use-rsync-transfer-mirror-files-directories.html
$rsync -avz --stats /tmp/dir1/ /tmp/dir2
from: http://www.unixtutorial.org/2008/09/how-to-synchronize-directories-with-rsync/