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,12 +138,18 @@ qu\nQUITTER\
DossierPresent $borg_repo DossierPresent $borg_repo
DossierPresent $borg_dir DossierPresent $borg_dir
borg list --short $borg_repo | grep $borg_archive
if [ "$?" = "0" ];then
zenity --warning $W $iconborg --text "L'archive existe déjà."
else
if [ "$VarDossierPresent" != "false" ];then if [ "$VarDossierPresent" != "false" ];then
borg create $borg_excludes $borg_compress $borg_repo::$borg_archive $borg_dir | ZenityPulsate borg create $borg_excludes $borg_compress $borg_repo::$borg_archive $borg_dir | ZenityPulsate
sync | ZenityPulsate sync | ZenityPulsate
zenity --notification --text "Sauvegarde $nomsauvegarde terminée" zenity --notification --text "Sauvegarde $nomsauvegarde terminée"
zenity $W --info --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