sauvegardes/bin/doinit-local

24 lines
520 B
Plaintext
Raw Permalink Normal View History

2023-01-17 14:21:45 +01:00
#!/bin/bash
help()
{
echo "Usage: doinit-local [ -h | -help | --help | <COMPUTER> ]"
echo "Init borgmatic configuration for the backup computer."
}
#
help=0
if (( $# != 0)); then
help
else
echo "== Create the borgmatic configuration file."
cp /srv/borg/models/model-conf-local.yaml /etc/borgmatic.d/$(hostname).yaml
echo "== Verify the bogmatic configuration file."
validate-borgmatic-config
echo "== Create the repository directory."
/srv/borg/bin/doinit $(hostname)
fi