View Single Post
Old 02-03-2025, 09:58 AM   #13
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Here is a LibraryClosedPlugin that backs up the configuration folder to a zip file when calibre is closed. It ignores library change events and configuration change restarts. It is configured using Preferences / Plugins / Library closed / Backup Configuration Folder then Customize Plugin. The defaults are probably sufficient for most people.

I've tested it on my config that uses CALIBRE_CONFIG_DIRECTORY. I haven't tried it without the ENV variable because everything I run uses it.

Thanks to @dunhill for the shutil.make_archive() pointer. Using it simplified things a lot.

I'll add this to the plugin index if there is sufficient interest.

Edit: See the first post for the newest version of the plugin.

Last edited by chaley; 02-04-2025 at 05:32 PM.
chaley is offline   Reply With Quote