sauvegardes/Plan Borg/bin/lastbackups

15 lines
354 B
Plaintext
Raw Normal View History

2023-01-16 19:44:21 +01:00
#!/bin/bash
SCRIPT_NAME="$(basename "$0")"
2023-01-17 14:21:45 +01:00
BORG_REPOS="/var/backups/borg/"
cd $BORG_REPOS
2023-01-16 19:44:21 +01:00
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" | sort -h | tail -1 | awk '{ print $1}' )
echo "$COMPUTER $OUTPUT"
fi
done