exclude backups

This commit is contained in:
Didier Denoual 2024-10-13 16:19:32 +02:00
parent db7be28fe7
commit 0116d0f51f

View File

@ -21,7 +21,7 @@ setKazVars
. $DOCKERS_ENV
. $KAZ_ROOT/secret/SetAllPass.sh
VERSION="V-02-09-2024"
VERSION="V-13-10-2024"
PRG=$(basename $0)
RACINE=$(echo $PRG | awk '{print $1}')
#IFS=' '
@ -55,6 +55,7 @@ BORGLOG="${borg_BORGLOG}/BorgBackup-$(date +%d-%m-%Y-%H-%M-%S).log"
DEBUG=false
#Fichier des sauvegardes a supprimer
BORG_FIC_DEL=${borg_BORG_FIC_DEL}
BORG_EXCLUDE_BACKUP=${borg_BORG_EXCLUDE_BACKUP}
#####################################################
#
@ -129,6 +130,7 @@ Sauvegarde() {
--show-rc \
--exclude 'home/*/.cache/*' \
--exclude 'var/tmp/*' \
--exclude-from ${BORG_EXCLUDE_BACKUP}\
::$(date +%Y-%m-%d-%H-%M-%S-%A)-{hostname} \
${LISTREPSAUV} >>${BORGLOG} 2>>${BORGLOG}
BACKUP_EXIT=$?
@ -281,6 +283,7 @@ LogFic " - Repertoire a sauver : ${LISTREPSAUV}"
LogFic " - Volume Nfs monté : ${VOLUME_SAUVEGARDES}"
LogFic " - Repertoire des sauvegardes : ${BORG_REPO}"
[ ! -d ${BORGSCRIPTS} ] && LogFic "Pas de repertoire de PRE et POST" || LogFic " - Repertoire des scripts Post/Pré : ${BORGSCRIPTS}"
[ -e ${BORG_EXCLUDE_BACKUP} ] && LogFic " - Fichier des exclusions : ${BORG_EXCLUDE_BACKUP}"
[ "${DEBUG}" = true ] && [ -d ${BORGSCRIPTS} ] && echo "Rep des scripts PRE/POST :${BORGSCRIPTS}"
LogFic " - Rapport par Mail : ${MAIL_RAPPORT}"
LogFic " - Backups jour : ${NB_BACKUPS_JOUR} , Backups semaines : ${NB_BACKUPS_SEM} , Backups mois : ${NB_BACKUPS_MOIS}"