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
|
||||
|
|
|
|||
11
backup.sh
11
backup.sh
|
|
@ -24,13 +24,14 @@ if [[ $# -lt 1 ]]; then
|
|||
pexit "Error: missing project(s)"
|
||||
fi
|
||||
|
||||
HN=$(hostname -f)
|
||||
if [[ ! $HN =~ "." ]]; then
|
||||
pexit "Error: fully quaififed hostname required (add to /etc/hosts - 127.0.0.11)"
|
||||
if [[ -n $RSYNC ]]; then
|
||||
HN=$(hostname -f)
|
||||
if [[ ! $HN =~ "." ]]; then
|
||||
pexit "Error: fully quaififed hostname required (add to /etc/hosts - 127.0.0.11)"
|
||||
fi
|
||||
printf "Hostname: ${HN}\n"
|
||||
fi
|
||||
|
||||
printf "Hostname: ${HN}\n"
|
||||
|
||||
pushd /srv/backup || pexit "Error: changing to backup directory"
|
||||
printf "Backup start: $(date)\n"
|
||||
for PROJECT in $@; do
|
||||
|
|
|
|||
Loading…
Reference in New Issue