ajout de -info scriptBorg
This commit is contained in:
parent
c2f02bfb3d
commit
a2542d8fea
@ -8,7 +8,7 @@ _borg()
|
||||
local current=${COMP_WORDS[COMP_CWORD]}
|
||||
case "$current" in
|
||||
-*)
|
||||
local_prop="-h -d -i -l -m -u -t -p -v"
|
||||
local_prop="-h -d -i -l -m -u -t -p -v -info"
|
||||
COMPREPLY=( $(compgen -W "${local_prop}" -- $current) )
|
||||
;;
|
||||
esac
|
||||
|
@ -21,7 +21,7 @@ setKazVars
|
||||
. $DOCKERS_ENV
|
||||
. $KAZ_ROOT/secret/SetAllPass.sh
|
||||
|
||||
VERSION="V-18-05-2024"
|
||||
VERSION="V-16-08-2024"
|
||||
PRG=$(basename $0)
|
||||
RACINE=$(echo $PRG | awk '{print $1}')
|
||||
#IFS=' '
|
||||
@ -137,9 +137,9 @@ Sauvegarde() {
|
||||
Purge() {
|
||||
borg prune \
|
||||
--prefix '{hostname}-' \
|
||||
--keep-daily ${NB_BACKUPS_JOUR} \
|
||||
--keep-weekly ${NB_BACKUPS_SEM} \
|
||||
--keep-monthly ${NB_BACKUPS_MOIS} \
|
||||
--keep-daily=${NB_BACKUPS_JOUR} \
|
||||
--keep-weekly=${NB_BACKUPS_SEM} \
|
||||
--keep-monthly=${NB_BACKUPS_MOIS} \
|
||||
|
||||
PRUNE_EXIT=$?
|
||||
}
|
||||
@ -156,6 +156,7 @@ echo "-h : Usage"
|
||||
echo "-c : Permet de compacter ${BORG_REPO}"
|
||||
echo "-d : Permet de verifier les variables de sauvegarde"
|
||||
echo "-i : Mode interractif"
|
||||
echo "-info"
|
||||
echo "-l : Liste les sauvegardes sans monter ${BORG_REPO}"
|
||||
echo "-m : Monte le REPO (${BORG_REPO} sur ${BORGMOUNT})"
|
||||
echo "-p : Permet de lancer la phase de purge des backup en fonctions des variables: jour=${NB_BACKUPS_JOUR},semaine=${NB_BACKUPS_SEM},mois=${NB_BACKUPS_MOIS}"
|
||||
@ -215,6 +216,11 @@ Borglist() {
|
||||
exit
|
||||
}
|
||||
|
||||
Borginfo() {
|
||||
LogFic "Borg info demandé"
|
||||
borg info ${BORG_REPO}
|
||||
exit
|
||||
}
|
||||
main() {
|
||||
|
||||
# ****************************************************** Main *******************************************************************
|
||||
@ -378,6 +384,11 @@ for ARG in $@; do
|
||||
[[ ${READPURGE} =~ ^[oO]$ ]] && Purge || echo "pas de purge"
|
||||
exit
|
||||
;;
|
||||
'-info' )
|
||||
shift
|
||||
Borginfo
|
||||
exit
|
||||
;;
|
||||
* | ' ' )
|
||||
usage
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user