sync_from_old_server.sh: some minor changes.

This commit is contained in:
Christoph 2021-05-15 13:18:56 +02:00
parent 7c96847ce6
commit 859fed5dc2

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
ipv4_old="192.168.82.10"
ipv4_old=""
old_server_ip=$ipv4_old
tmp_err_msg=$(mktemp)
@ -8,24 +8,7 @@ log_dir=/root/sync_from_old_server_logs
# - Sync Home Directoties
# -
sync_home_dirs="
/data/home/anna
/data/home/back
/data/home/birgit
/data/home/buero
/data/home/chris
/data/home/frauke
/data/home/fsj
/data/home/jibran
/data/home/jonas
/data/home/julia
/data/home/kamera
/data/home/localadmin
/data/home/maica
/data/home/praktikum
/data/home/sysadm
/data/home/thomas
"
sync_home_dirs=""
# - Sync web directories (included document root directory
@ -84,9 +67,7 @@ sync_dehydrated_dirs=""
# - the basename of the destination directory must be the same as
# - the basename of the source directory.
# -
sync_other_dirs="
/data/samba
"
sync_other_dirs=""
# - Sync files
@ -530,6 +511,7 @@ if $_got_vhost_dirs ; then
--exclude 000-default.conf \
--exclude 000-dehydrated.conf \
--exclude 000-logformat.conf \
--exclude 000-deflate.conf \
$old_server_ip:$sync_dir $(dirname $sync_dir)/ >> $log_file 2> $tmp_err_msg
if [[ $? -eq 0 ]];then
echo_ok
@ -560,6 +542,7 @@ if $_got_vhost_dirs ; then
[[ "$(basename $_file)" = "000-default.conf" ]] && continue
[[ "$(basename $_file)" = "000-dehydrated.conf" ]] && continue
[[ "$(basename $_file)" = "000-logformat.conf" ]] && continue
[[ "$(basename $_file)" = "000-deflate.conf" ]] && continue
if [[ -f "$_file" ]]; then