24 lines
520 B
Plaintext
24 lines
520 B
Plaintext
|
#!/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
|
||
|
|