vérification de la liste des archives avant de lancer la sauvegarde

This commit is contained in:
Djan GICQUEL 2021-08-07 14:05:54 +02:00
parent 903fef08b5
commit 4be772928d

View File

@ -138,13 +138,19 @@ qu\nQUITTER\
DossierPresent $borg_repo DossierPresent $borg_repo
DossierPresent $borg_dir DossierPresent $borg_dir
if [ "$VarDossierPresent" != "false" ];then borg list --short $borg_repo | grep $borg_archive
borg create $borg_excludes $borg_compress $borg_repo::$borg_archive $borg_dir | ZenityPulsate if [ "$?" = "0" ];then
sync | ZenityPulsate zenity --warning $W $iconborg --text "L'archive existe déjà."
zenity --notification --text "Sauvegarde $nomsauvegarde terminée" else
zenity $W --info --text "Sauvegarde $nomsauvegarde terminée" if [ "$VarDossierPresent" != "false" ];then
borg create $borg_excludes $borg_compress $borg_repo::$borg_archive $borg_dir | ZenityPulsate
sync | ZenityPulsate
zenity --notification --text "Sauvegarde $nomsauvegarde terminée"
zenity $W --info --text "Sauvegarde $nomsauvegarde terminée"
fi
fi fi
elif [ "$choixmenu" = "ms" ];then elif [ "$choixmenu" = "ms" ];then
# Monter une archive # Monter une archive
BorgFilter BorgFilter