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

added testfile to check a mounted volume

parent cc752c65
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,8 @@ Runs on Linux. ...@@ -5,8 +5,8 @@ Runs on Linux.
Free software. GNU GPL 3.0. Free software. GNU GPL 3.0.
Source: https://git-repo.iml.unibe.ch/iml-open-source/iml-backup/ Source: <https://git-repo.iml.unibe.ch/iml-open-source/iml-backup/>
Duplicity: http://duplicity.nongnu.org/ Duplicity: <http://duplicity.nongnu.org/>
## Why ## ## Why ##
......
...@@ -59,6 +59,10 @@ restore-path = /restore ...@@ -59,6 +59,10 @@ restore-path = /restore
# use local filesystem or mounted device # use local filesystem or mounted device
# storage = scp://imlbackup@lithium.iml.unibe.ch//netshare/backup/one # storage = scp://imlbackup@lithium.iml.unibe.ch//netshare/backup/one
# for file:// targets - you can add a test file that must be found
# to detect that a backup volume is mounted
# storage-file = /run/media/username/nas/I_am_mounted.txt
# ssh-privatekey = /opt/imlbackup/client/keys/id_rsa_4_backupserver # ssh-privatekey = /opt/imlbackup/client/keys/id_rsa_4_backupserver
ssh-privatekey = ssh-privatekey =
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# 2017-11-17 ah,ds v1.5 check pid of lockfile in process list if process still runs # 2017-11-17 ah,ds v1.5 check pid of lockfile in process list if process still runs
# 2018-06-19 ah,ds v1.6 replace --exclude with --exclude regexp in custom dirs # 2018-06-19 ah,ds v1.6 replace --exclude with --exclude regexp in custom dirs
# 2019-06-05 ah,ds v1.7 add custom cache dir # 2019-06-05 ah,ds v1.7 add custom cache dir
# 2019-09-09 ah,ds v1.8 add testfile on target
# ================================================================================ # ================================================================================
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
typeset -i rc=0 typeset -i rc=0
STORAGE_BASEDIR=`_j_getvar ${STORAGEFILE} "storage"` STORAGE_BASEDIR=`_j_getvar ${STORAGEFILE} "storage"`
STORAGE_TESTFILE=`_j_getvar ${STORAGEFILE} "storage-file"`
STORAGE_KEEP=`_j_getvar ${STORAGEFILE} "keep"` STORAGE_KEEP=`_j_getvar ${STORAGEFILE} "keep"`
STORAGE_VOLSIZE=`_j_getvar ${STORAGEFILE} "volsize"` STORAGE_VOLSIZE=`_j_getvar ${STORAGEFILE} "volsize"`
...@@ -53,7 +55,14 @@ ...@@ -53,7 +55,14 @@
color reset color reset
exit 1 exit 1
fi fi
if [ ! -z $STORAGE_TESTFILE -a ! -f $STORAGE_TESTFILE ]; then
color error
echo ERROR: missing testfile $STORAGE_TESTFILE on backup target.
echo The Backup target disk / NAS is not mounted.
color reset
exit 1
fi
if [ -z $STORAGE_KEEP ]; then if [ -z $STORAGE_KEEP ]; then
color error color error
echo ERROR: missing config for backup target. echo ERROR: missing config for backup target.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment