backup.sh updates etc
This commit is contained in:
parent
bde62426ae
commit
21e339a255
|
|
@ -1 +1 @@
|
||||||
14 4 * * * root /srv/backup/backup.sh -r "/srv/fsback" docker 2>&1 |tee /srv/fsback/$(date +%^a).log
|
14 4 * * * root /srv/backup/backup.sh -r "/srv/fsback" docker mailus 2>&1 |tee /srv/fsback/$(date +%^a).log
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,13 @@ if [[ $# -lt 1 ]]; then
|
||||||
pexit "Error: missing project(s)"
|
pexit "Error: missing project(s)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n $RSYNC ]]; then
|
||||||
HN=$(hostname -f)
|
HN=$(hostname -f)
|
||||||
if [[ ! $HN =~ "." ]]; then
|
if [[ ! $HN =~ "." ]]; then
|
||||||
pexit "Error: fully quaififed hostname required (add to /etc/hosts - 127.0.0.11)"
|
pexit "Error: fully quaififed hostname required (add to /etc/hosts - 127.0.0.11)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Hostname: ${HN}\n"
|
printf "Hostname: ${HN}\n"
|
||||||
|
fi
|
||||||
|
|
||||||
pushd /srv/backup || pexit "Error: changing to backup directory"
|
pushd /srv/backup || pexit "Error: changing to backup directory"
|
||||||
printf "Backup start: $(date)\n"
|
printf "Backup start: $(date)\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue