28 lines
507 B
Plaintext
28 lines
507 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
help()
|
||
|
{
|
||
|
echo "Usage: doborgbackup [ -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"
|
||
|
|
||
|
sh root@$COMPUTER "borgmatic create $OPTIONS --stats --verbosity 1 --syslog-verbosity 1"
|
||
|
fi
|