sauvegardes/Plan Borg/bin/doborgchecks

29 lines
512 B
Plaintext
Raw Normal View History

2023-01-15 01:10:38 +01:00
#!/bin/bash
help()
{
echo "Usage: doborgchecks [ -h | -help | --help | <MACHINE> ]"
}
#
help=0
if (( $# != 1)); then
help=1
else
for parameter in $@; do
if [ "$parameter" == "-h" ] || [ "$parameter" == "-help" ] || [ "$parameter" == "--help" ]; then
help=1
fi
done
fi
if (( $help )); then
help
else
MACHINE="$1"
BORG_REPOS="/var/backups/borg"
borgmatic -c $CONFIG check --verbosity 1
borgmatic -c $CONFIG prune --stats --verbosity 1
fi