modif backup.sh

This commit is contained in:
Theo Vallet 2021-01-18 09:14:33 +01:00
parent 8f7ad1e13a
commit 7383918973

View File

@ -6,12 +6,12 @@ SWIN=/tmp/s-win
[ -d "${BDIR}" ] || mkdir "${BDIR}/s-win"
[ -d "${SWIN}" ] || mkdir "${SWIN}"
mount -t cifs -o ro,vers3.0,username=u-backup,password=Azerty1+ //s-win/commun "{SWIN}"
mount -t cifs -o ro,vers3.0,username=u-backup,password=Azerty1+ //s-win/commun "${SWIN}"
if [ $? != 0 ] ; then
echo "$0 : erreur montage"
echo "$0 : erreur montage ${SWIN}"
exit 1
fi
rsync -av "${SWIN}"/ /home/backup/s-win/commun
rsync -av "${SWIN}/" "${BDIR}/s-win/commun"
umount "${SWIN}"
@ -20,8 +20,8 @@ if [ $? != 0 ] ; then
echo "$0 : erreur montage"
exit 2
fi
rsync -av "{SWIN}"/ /home/backup/s-win/public
umount "{SWIN}"
rsync -av "${SWIN}/" "${BDIR}/s-win/public"
umount "${SWIN}"
exit 0