sauvegardes/Plan Borg/bin/dobackup-rsync

29 lines
577 B
Bash
Executable File

#!/bin/bash -x
help()
{
echo "Usage: dobackup-rsync [ -h | -help | --help | <MACHINE> ]"
echo "Rsync remote before backup it."
}
#
help=0
if (( $# != 1)); then
help=1
elif [ "$parameter" == "-h" ] || [ "$parameter" == "-help" ] || [ "$parameter" == "--help" ]; then
help=1
fi
if (( $help )); then
help
else
COMPUTER="$1"
REMOTE_USER=admin666
echo "===== $COMPUTER ====="
CONFIG="/etc/borgmatic.d/$COMPUTER.yaml"
if [ -f "$CONFIG" ]; then
borgmatic -c $CONFIG create $OPTIONS --stats --verbosity 1 --syslog-verbosity 1
fi
fi