Fixing bug where nfs/usmb shares were never mounted
This commit is contained in:
parent
b09a7b16cc
commit
f3ea526fc9
20
bare.sh
20
bare.sh
|
@ -292,6 +292,14 @@ for f in $REPOSTOBACKUP; do
|
|||
log "can't find matching repo for $f - make sure it is listed in ${REPOFILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $CMD == "go" ]]; then
|
||||
NEEDMOUNT=1
|
||||
elif [[ $CMD == "diff" ]]; then
|
||||
NEEDMOUNT=1
|
||||
else
|
||||
NEEDMOUNT=0
|
||||
fi
|
||||
|
||||
if [[ $NEEDMOUNT -eq 1 ]]; then
|
||||
if [[ $USEUSMB -eq 1 ]]; then
|
||||
|
@ -362,8 +370,8 @@ for f in $REPOSTOBACKUP; do
|
|||
|
||||
getmode "$f"
|
||||
|
||||
|
||||
if [[ $mode == "restic" ]]; then
|
||||
MYREPO="restic: $RESTIC_REPOSITORY"
|
||||
if [[ -z $KSPEED ]]; then
|
||||
SPEEDOPTS=""
|
||||
else
|
||||
|
@ -378,6 +386,8 @@ for f in $REPOSTOBACKUP; do
|
|||
|
||||
AUTHOPTS="-p ${AUTHFILE}"
|
||||
elif [[ $mode == "rsync" ]]; then
|
||||
# rsync
|
||||
MYREPO="rsync: ${RSYNC_USER}@${RSYNC_SERVER}:${RSYNC_FULLDIR}"
|
||||
for f in RSYNC_SERVER RSYNC_USER RSYNC_DIR RSYNC_OPTIONS ]]; do
|
||||
eval val='$'$f
|
||||
if [[ -z $val ]]; then
|
||||
|
@ -388,7 +398,6 @@ for f in $REPOSTOBACKUP; do
|
|||
fi
|
||||
done
|
||||
|
||||
# rsync
|
||||
if [[ -z $KSPEED ]]; then
|
||||
SPEEDOPTS=""
|
||||
else
|
||||
|
@ -397,6 +406,7 @@ for f in $REPOSTOBACKUP; do
|
|||
CONNECTIONSOPTS=""
|
||||
else
|
||||
# rclone
|
||||
MYREPO="rclone: $RCLONE_REPOSITORY"
|
||||
if [[ -z $KSPEED ]]; then
|
||||
SPEEDOPTS=""
|
||||
else
|
||||
|
@ -410,8 +420,9 @@ for f in $REPOSTOBACKUP; do
|
|||
fi
|
||||
fi
|
||||
|
||||
log "Starting '$CMD' on repo '$REPO' [$DATAPATH]"
|
||||
|
||||
|
||||
text="Starting '$CMD' on repo '$REPO' [$DATAPATH <-> $MYREPO]"
|
||||
log "$text"
|
||||
|
||||
if [[ $mode == "restic" ]]; then
|
||||
if [[ $CMD == "go" ]]; then
|
||||
|
@ -449,6 +460,7 @@ for f in $REPOSTOBACKUP; do
|
|||
ssh ${RSYNC_USER}@${RSYNC_SERVER} ls ${RSYNC_FULLDIR} 2>&1 >> ${LOG}
|
||||
rv=$?
|
||||
elif [[ $CMD == "stats" ]]; then
|
||||
echo "Size of remote data for ${REPO}:"
|
||||
ssh ${RSYNC_USER}@${RSYNC_SERVER} du -hs ${RSYNC_FULLDIR} 2>&1 >> ${LOG}
|
||||
rv=$?
|
||||
elif [[ $CMD == "diff" ]]; then
|
||||
|
|
Loading…
Reference in New Issue