modif backup.sh
This commit is contained in:
parent
8f7ad1e13a
commit
7383918973
@ -6,12 +6,12 @@ SWIN=/tmp/s-win
|
|||||||
[ -d "${BDIR}" ] || mkdir "${BDIR}/s-win"
|
[ -d "${BDIR}" ] || mkdir "${BDIR}/s-win"
|
||||||
[ -d "${SWIN}" ] || mkdir "${SWIN}"
|
[ -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
|
if [ $? != 0 ] ; then
|
||||||
echo "$0 : erreur montage"
|
echo "$0 : erreur montage ${SWIN}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rsync -av "${SWIN}"/ /home/backup/s-win/commun
|
rsync -av "${SWIN}/" "${BDIR}/s-win/commun"
|
||||||
umount "${SWIN}"
|
umount "${SWIN}"
|
||||||
|
|
||||||
|
|
||||||
@ -20,8 +20,8 @@ if [ $? != 0 ] ; then
|
|||||||
echo "$0 : erreur montage"
|
echo "$0 : erreur montage"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
rsync -av "{SWIN}"/ /home/backup/s-win/public
|
rsync -av "${SWIN}/" "${BDIR}/s-win/public"
|
||||||
umount "{SWIN}"
|
umount "${SWIN}"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user