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 09-13-2018, 04:38 PM   #1
userwang
Junior Member
userwang began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2018
Device: none
Automatically back up library with custom directory structure

At the moment I will occasionally make a backup my Calibre library to a folder on my PC using the 'connect to folder' function then syncing as a device. I also specify my own custom directory structure.

I know that the 'save to disc' button does essentially the same thing, but takes a little longer since it recopies the files every time.

Is there anyway to automate this process, so the backup is made every time I close Calibre for example?

kind regards
userwang is offline   Reply With Quote
Old 09-13-2018, 05:23 PM   #2
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,645
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by userwang View Post
At the moment I will occasionally make a backup my Calibre library to a folder on my PC using the 'connect to folder' function then syncing as a device. I also specify my own custom directory structure.

I know that the 'save to disc' button does essentially the same thing, but takes a little longer since it recopies the files every time.

Is there anyway to automate this process, so the backup is made every time I close Calibre for example?
Longshot: There may be a way to do the 'connect to folder syncing' via the undocumented command line tool 'ebook-device'. In which case you could run calibre from a script and run the 'ebook-device' command when it exits. See ==>> calibre User Manual: Command Line Interface

Otherwise: It might be best done with a Library Closed Plugin.

However: If its for backup why not use one of the folder/file synchronisation tools to maintain a mirror of the library. In the event of a catastrophic failure (e.g. head crash) the mirror could be used as a calibre library, as well as being the source for restoring individual books in the event of a user error (e.g. accidental deletion). Some of those tools can be run from the command line, and/or have hooks into the OS scheduling facilities.

BR
BetterRed is offline   Reply With Quote
Advert
Old 09-13-2018, 05:49 PM   #3
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,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
I start calibre from a script and added some rsync stuff to the script. This means that every time I quit calibre a full timestamped snapshot of all my calibre libraries is made. This is pretty fast since the previous snapshot is "reused" and only changed files have to be updated in the new snapshot.

The scipt can be found here: https://www.mobileread.com/forums/sh...d.php?t=244228

I still use pretty much the same script.

You can "transform" a calibre library by renaming and moving the books and creating new folders and sub folders in marvelous (to you) meaningful (to you) structures.

There is a script that can do this. It is a part of ebook-tools, rename-calibre-library.sh. You can find ebook-tools here: https://github.com/na--/ebook-tools

Now you just have to combine what these scripts do, and you have exactly(?) what you ask for. The scripts I mention are for Linux, but I think Microsoft has added some Linux compability to Windows, so the scripts may be possible to adapt to a Windows environment. Or you can join the dark side...

Last edited by Adoby; 09-13-2018 at 05:53 PM.
Adoby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filename and directory structure jason.jackal Library Management 5 03-19-2016 07:36 AM
Directory Structure davcefai Which one should I buy? 49 09-14-2015 03:05 AM
Automatically populating metadata "tags" field from directory structure battaglia01 Calibre 1 12-13-2012 09:23 PM
Directory structure praky Library Management 36 01-24-2011 08:23 AM
directory structure Dopedangel Calibre 7 08-20-2009 06:17 AM


All times are GMT -4. The time now is 07:53 PM.


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