[GNC] Book backup script

cicko alen.siljak at gmx.com
Fri Apr 20 05:23:30 EDT 2018


Just in case someone may find it useful, here's my Python backup script for
the GnuCash sqlite book:

https://gist.github.com/MisterY/260f45fbcd7cec00acaa5284811eb41b

For the moment, I run it manually every time I create a few transactions I
would prefer not to lose. The script will copy the current file
(configurable inside the script) to a "backup" directory and compress it on
the fly using LZMA. It will keep a pre-defined number of files in the backup
directory(also configurable in the script). 
It will also delete the .log files from the working directory to clean it
up.

Beside these backups, occassionally I copy a backup file into the "long-term
backup" directory, which I maintain manually for the moment.

The script can be used as-is and, if you have any suggestions on how to
improve it, please let me know.

Cheers



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html


More information about the gnucash-user mailing list