Backing up metadata.db on exit
After messing up a bulk edit I am wondering if it is possible to get calibre to create a backup copy of metadata.db each time it is shutdown. That is, on exit, copy metadata.db to metadata-backup-yymmdd.db (or some other numbering system) up to a maximum number of backups.
This would allow me to restore a previous metadata.db and run check_library to revert to a previous state. I do keep regular backups of my filesystem but these are only run once a day. When I spend an afternoon cleaning up metadata I usually start and stop calibre several times so there would be the potential to save a lot of work reverting to a known good state.
I thought of wrapping calibre in a script to do this but I have several libraries so it is a bit more complicated than a 3 line script.
|