Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
csback
Commits
7b128e40
Commit
7b128e40
authored
Sep 02, 2016
by
thomas.forbriger
Browse files
BFO2LSDF [FEATURE]: support rsync dry-run
parent
503ff308
Changes
1
Hide whitespace changes
Inline
Side-by-side
BFO2LSDF.sh
View file @
7b128e40
...
...
@@ -29,6 +29,9 @@
# - re-establish VPN tunnel for each directory
# 15/05/2016 V1.6 add subdirectory for long term archive of
# experiments
# 02/09/2016 V1.7 make program fit for bromo:
# - support dry-run
# - use openvpn instead of vpnc
#
# ============================================================================
#
...
...
@@ -37,6 +40,8 @@ TUN_INTERFACE=tun0
# approx. 80% of 256 kBit/second
BWLIMIT
=
20
EXCLUDE
=
"--exclude='.lock'"
DRYRUN
=
DRYRUN
=
--dry-run
BFO_BASEDIR
=
/media/BFO_archive
#LSDF_BASEDIR=\
#gpi-lsdf-seis-0001@gpilsdf.gpi.uni-karlsruhe.de:/home/gpi-lsdf-seis-0001/LSDF/SEIS/projects/BFO
...
...
@@ -107,16 +112,22 @@ do
fi
fi
if
test
"
$DRYRUN
"
=
"--dry-run"
then
${
LOGGER
}
-i
-p
user.info
"
${
LOGINFO
}
\
dry-run of copy operation (i.e. files are not actually copied)"
fi
# copy data (compressed)
${
LOGGER
}
-i
-p
user.info
"
${
LOGINFO
}
\
${
RSYNC
}
-v -z -a --protocol=29 --bwlimit
${
BWLIMIT
}
${
EXCLUDE
}
\
-e
\"
${
SSHCMD
}
\"
\
-e
\"
${
SSHCMD
}
\"
$DRYRUN
\
--backup --suffix=
$(
date
+
'%Y%m%d%H%M'
)
\
${
EXCLUDE_PATTERNS
[
$i
]
}
${
BFO_BASEDIR
}
/
${
DATADIRS
[
$i
]
}
\
${
LSDF_BASEDIR
}
/
${
DATADIRS
[
$i
]
}
"
set
-o
pipefail
${
RSYNC
}
-v
-z
-a
--protocol
=
29
--bwlimit
${
BWLIMIT
}
${
EXCLUDE
}
\
-e
"
${
SSHCMD
}
"
\
-e
"
${
SSHCMD
}
"
$DRYRUN
\
--backup
--suffix
=
$(
date
+
'%Y%m%d%H%M'
)
\
${
EXCLUDE_PATTERNS
[
$i
]
}
${
BFO_BASEDIR
}
/
${
DATADIRS
[
$i
]
}
\
${
LSDF_BASEDIR
}
/
${
DATADIRS
[
$i
]
}
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment