Updated rsync.sh results

This commit is contained in:
Damien Broqua 2021-08-30 16:14:08 +02:00
parent a470fa5b01
commit d6b40f5ea3

View file

@ -48,7 +48,6 @@ DEST_USB="/mnt/backup/${HOSTNAME}/dbroqua/"
# SSHFS
DEST_SSHFS="storage:Backup/${HOSTNAME}/dbroqua/"
echo `date` > ${ORIG}/lastBackup
while getopts t:h opt
do
@ -71,7 +70,6 @@ do
esac
done
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
if [ "${TYPE}" != '' ] ; then
case ${TYPE} in
@ -91,3 +89,14 @@ if [ "${TYPE}" != '' ] ; then
esac
fi
echo $?
if [ $? == 0 ] ; then
echo `date` > ${ORIG}/lastBackup
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
rm ${ORIG}/lastFailBackup
else
echo `date` > ${ORIG}/lastFailBackup
echo "Method: ${TYPE}" >> ${ORIG}/lastFailBackup
fi