It is possible to launch calibre from a script. Make sure the script is found first in the path of folders searched when running commands.
In the script start calibre, using the full path.
After calibre exit, continue the script with the commands needed to backup metadata.db. You may want to add a timestamp to each backup copy and delete the oldest.
I used to do this, but now I just double click a script to backup all my calibre libraries, books and database and all, using rsync snapshots. I keep 7 daily backup snapshots, 4 weekly and 4 monthly snapshots. Since unchanged files are shared among the snapshots it is very fast to update them and they take up very little storage.
I do this between two SSDs in my laptop. Usually takes less than 15 seconds. I also do this, over night, between my laptop and a NAS. Takes a couple of hours. Mostly hardlinking from old snapshots to new snapshot.
So I can travel back in time to retrieve old formats, as needed. Up to 5 months back. (4 weekly
= 1 month.)
|