Skip to content
Snippets Groups Projects
Commit 8d0caff6 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch '5046-finetune-restic-params' into 'master'

improve infos on start of backup.sh

See merge request !37
parents 14619103 4130ad17
No related branches found
No related tags found
1 merge request!37improve infos on start of backup.sh
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# ah - Axel Hahn <axel.hahn@iml.unibe.ch> # ah - Axel Hahn <axel.hahn@iml.unibe.ch>
# #
# 2022-01-14 ah v1.0 # 2022-01-14 ah v1.0
# 2022-02-10 ah v1.1 handle local dumps only; improve infos
# ================================================================================ # ================================================================================
. $( dirname "$0" )/jobhelper.sh . $( dirname "$0" )/jobhelper.sh
...@@ -125,6 +126,19 @@ EOFhelp ...@@ -125,6 +126,19 @@ EOFhelp
# show infos # show infos
# -------------------------------------------------------------------------------- # --------------------------------------------------------------------------------
# TODO:
# check localdump plugins ... what database types are detected
# --- infos for transfer
STORAGE_BASEDIR=$(_j_getvar "${STORAGEFILE}" "storage")
if [ -z "$STORAGE_BASEDIR" ]; then
echo "INFO: no value for backup target (in storage = ...)"
echo "This is not handled as an error. I will run local backup dumps only; no transfer."
else
STORAGE_BIN=$( _j_getvar "${STORAGEFILE}" "bin" )
cfg_type=$(_j_getvar "${STORAGEFILE}" "type") cfg_type=$(_j_getvar "${STORAGEFILE}" "type")
cfg_full=$(_j_getvar "${STORAGEFILE}" "full") cfg_full=$(_j_getvar "${STORAGEFILE}" "full")
cfg_startfull=$(_j_getvar "${STORAGEFILE}" "start-time-full") cfg_startfull=$(_j_getvar "${STORAGEFILE}" "start-time-full")
...@@ -132,8 +146,6 @@ EOFhelp ...@@ -132,8 +146,6 @@ EOFhelp
test -z "${cfg_full}${cfg_startfull}" || cfg_info="INFO: Type is [auto]; ignoring config for full backup: [full = $cfg_full ... start-time-full = $cfg_startfull]" test -z "${cfg_full}${cfg_startfull}" || cfg_info="INFO: Type is [auto]; ignoring config for full backup: [full = $cfg_full ... start-time-full = $cfg_startfull]"
JOBDEF_STARTTIME=$(date +%H%M) JOBDEF_STARTTIME=$(date +%H%M)
STORAGE_BIN=$( _j_getvar "${STORAGEFILE}" "bin" )
STORAGE_BASEDIR=$(_j_getvar "${STORAGEFILE}" "storage")
cat << EOFbackupinfo cat << EOFbackupinfo
...@@ -146,22 +158,22 @@ EOFhelp ...@@ -146,22 +158,22 @@ EOFhelp
type : $JOBDEF_TYPE $JOBDEF_AUTO type : $JOBDEF_TYPE $JOBDEF_AUTO
log : $JOB_LOGFILE log : $JOB_LOGFILE
target : ${STORAGE_BASEDIR}$( test -z "$STORAGE_BASEDIR" && echo "NONE (local backup dumps only; no transfer)") target : ${STORAGE_BASEDIR}
EOFbackupinfo EOFbackupinfo
test -z "$STORAGE_BASEDIR" || ( test -z "$STORAGE_BASEDIR" || (
echo " dirs to transfer : " echo " dirs to transfer : "
j_getDirs2Backup | sed "s#^# #g" j_getDirs2Backup | sed "s#^# #g"
echo
) )
fi
j_requireUser "root" echo
# -------------------------------------------------------------------------------- # --------------------------------------------------------------------------------
# start backup # start backup
# -------------------------------------------------------------------------------- # --------------------------------------------------------------------------------
j_requireUser "root"
if [ $bStart -eq 1 ]; then if [ $bStart -eq 1 ]; then
sleep 3 sleep 3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment