adding bobastats

This commit is contained in:
Djan 2022-08-25 14:09:40 +02:00
parent 12f02051c7
commit 303917b56d

View File

@ -183,6 +183,20 @@ function bobainfoall {
done
}
function bobastats {
TestBorgRepo
if ! which jq ;then
echo "Install jq and retry."
else
echo "name,duration,original_size,compressed_size,deduplicated_size" > borg-stats-$(date +%Y-%m-%d).csv
for borgarchive in $(borg list --short ./);do
echo "Precessing "$borgarchive...""
borg info --json .::"$borgarchive" | jq -r '.archives[] | [.name,.duration,.stats.original_size,.stats.compressed_size,.stats.deduplicated_size] | @csv' >> "borg-stats-$(date +%Y-%m-%d).csv"
done
fi
}
function bobadurationr {
TestBorgRepo