Skip to content

Commit

Permalink
Changement du path de sauvegarde
Browse files Browse the repository at this point in the history
  • Loading branch information
Merrick28 committed Apr 8, 2022
1 parent cc1c0d8 commit 5cac987
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/config/roles/backup/templates/backup.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ "$myid" -eq 0 ]; then
remote_backups=BACKUPS
NB_MAX_BACKUP=3
CDAY=$(date +%Y%m%d-%H%M)
BACKUP_PARTITION=/var/backup/local
BACKUP_PARTITION=/home/${SUDO_USER}/backup
BACKUP_FOLDER=$BACKUP_PARTITION/backup-$CDAY
ARCHIVE=$BACKUP_FOLDER/backup-$CDAY.tar.gz

Expand Down
6 changes: 3 additions & 3 deletions includes/config/roles/backup/templates/restore.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ CCYAN="${CSI}0;36m"

backupList() {

local backups=(/var/backup/local/backup-*)
local backups=(/home/${SUDO_USER}/backup/backup-*)
local i=0
local n=""

if [[ ! -d /var/backup/local ]]; then
if [[ ! -d /home/${SUDO_USER}/backup ]]; then
echo ""
echo -e "\n${CRED}/!\ ERREUR: Aucune sauvegarde locale existante.${CEND}\n" 1>&2
exit 1
Expand Down Expand Up @@ -76,7 +76,7 @@ localRestoration() {
read -r

echo "> Récupération de l'archive locale"
cp /var/backup/local/"$ARCHIVEPATH"/*.tar.gz* .
cp /home/${SUDO_USER}/backup/"$ARCHIVEPATH"/*.tar.gz* .

}

Expand Down

0 comments on commit 5cac987

Please sign in to comment.