Plan borg: updates (step).

This commit is contained in:
Christian P. MOMON 2023-01-18 01:21:04 +01:00
parent a71ddd74d3
commit 1ea38d7342
1 changed files with 14 additions and 0 deletions

14
Plan Borg/bin/countbackups Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
SCRIPT_NAME="$(basename "$0")"
BORG_REPOS="/var/backups/borg/"
cd $BORG_REPOS
for BORG_REPO in $(ls -d *.repo); do
if [ -d "$BORG_REPO" ]; then
#echo "$BORG_REPO"
COMPUTER=$(printf "%-40s" ${BORG_REPO::-5})
OUTPUT=$(borg list "$BORG_REPO" | awk '{ print $1}' | wc -l)
echo "$COMPUTER $OUTPUT"
fi
done