Compare commits

...

4 Commits

Author SHA1 Message Date
3b178d0a52 modif du nom icinga-fk en icinga 2021-01-18 09:10:10 +01:00
be3cb4ecca commit backup.sh 2021-01-18 08:58:54 +01:00
678858e4b1 Merge branch 'master' of https://gitea.lyc-lecastel.fr/gadmin/gsb2021 2021-01-18 08:31:40 +01:00
9ea66d55be commit modif s-backup cifs-utils 2021-01-12 17:50:14 +01:00
29 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/bin/bash
BDIR=/home/backup
SWIN=/tmp/s-win
[ -d "${BDIR}" ] || mkdir "${BDIR}"
[ -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}"
if [ $? != 0 ] ; then
echo "$0 : erreur montage"
exit 1
fi
rsync -av "${SWIN}"/ /home/backup/s-win/commun
umount "${SWIN}"
mount -t cifs -o ro,vers3.0,username=u-backup,password=Azerty1+ //s-win/public "${SWIN}"
if [ $? != 0 ] ; then
echo "$0 : erreur montage"
exit 2
fi
rsync -av "{SWIN}"/ /home/backup/s-win/public
umount "{SWIN}"
exit 0

View File

@ -4,5 +4,6 @@
name:
- rsync
- smbclient
- cifs-utils
state: present