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

improve infos

parent 20d5853c
No related branches found
No related tags found
1 merge request!37improve infos on start of backup.sh
......@@ -13,6 +13,7 @@
# ah - Axel Hahn <axel.hahn@iml.unibe.ch>
#
# 2022-01-14 ah v1.0
# 2022-02-10 ah v1.1 handle local dumps only; improve infos
# ================================================================================
. $( dirname "$0" )/jobhelper.sh
......@@ -125,17 +126,28 @@ EOFhelp
# show infos
# --------------------------------------------------------------------------------
cfg_type=$(_j_getvar "${STORAGEFILE}" "type")
cfg_full=$(_j_getvar "${STORAGEFILE}" "full")
cfg_startfull=$(_j_getvar "${STORAGEFILE}" "start-time-full")
# TODO:
# check localdump plugins ... what database types are detected
# --- infos for transfer
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)
STORAGE_BIN=$( _j_getvar "${STORAGEFILE}" "bin" )
STORAGE_BASEDIR=$(_j_getvar "${STORAGEFILE}" "storage")
cat << EOFbackupinfo
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_full=$(_j_getvar "${STORAGEFILE}" "full")
cfg_startfull=$(_j_getvar "${STORAGEFILE}" "start-time-full")
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)
cat << EOFbackupinfo
CONFIG:
Used Backup tool : $STORAGE_BIN
......@@ -146,22 +158,22 @@ EOFhelp
type : $JOBDEF_TYPE $JOBDEF_AUTO
log : $JOB_LOGFILE
target : ${STORAGE_BASEDIR}$( test -z "$STORAGE_BASEDIR" && echo "NONE (local backup dumps only; no transfer)")
target : ${STORAGE_BASEDIR}
EOFbackupinfo
test -z "$STORAGE_BASEDIR" || (
echo " dirs to transfer : "
j_getDirs2Backup | sed "s#^# #g"
echo
)
j_requireUser "root"
test -z "$STORAGE_BASEDIR" || (
echo " dirs to transfer : "
j_getDirs2Backup | sed "s#^# #g"
)
fi
echo
# --------------------------------------------------------------------------------
# start backup
# --------------------------------------------------------------------------------
j_requireUser "root"
if [ $bStart -eq 1 ]; then
sleep 3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment