Closed alexmitchell closed 4 years ago
What is your desired use-model? Do you want to be able to configure emborg so that:
Case 1. Though I would be okay with 2 or 3 instead too.
I mostly want to be alerted somehow when archives are deleted and also be aware of the total size of my archive.
Okay, I have this implemented, but I am in the middle of some big changes so it is going to take a bit for it to become available; perhaps a week or two. I have added the --stats option to the create, delete, and prune commands, so you can request the stats on a specific run (case 3). I also added the show_stats setting, so you can configure Emborg to always output the stats (case 1). And finally, if you do not request the stats, they will be saved into the log file so you can find them if you later decide you want them (case 2).
Okay wonderful, thank you.
I have updated Emborg on github to version 1.14.5. With this version the create, delete and prune commands now take --stats command line argument. For example:
emborg create --stats
In addition, Emborg also takes a show_stats setting that causes Emborg to show the stats every time one of these commands is run. Just add:
show_stats = True
to your settings file.
Finally, if you do not explicitly ask for stats using --stats or show_stats, then the stats are captured in the log file and you can run emborg log
to see them.
This was a relatively small change, but I made it while doing a substantial refactoring of the code to support Borg patterns. Be careful with this version. Keep an eye on it and make sure it working as expected. Once I am confident that this new version is stable I will upload it to pypi, but that may take some time.
-Ken
I would like to automatically pass '--stats' to the prune function when I run 'emborg -v --narrate create' with prune_after_create enabled in the settings file. I like to see what emborg and borg are doing (though '--list' for prune might be too much info). I would guess that the easiest way might be to change the default behaviour of verbose to include stats for prune. But I don't know it that is true, how to do it myself, or if others would appreciate that default behaviour.