sauvegardes/Plan Borg/bin/countbackups

15 lines
341 B
Bash
Executable File

#!/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