Skip to content

Commit

Permalink
Modification de la liste des répertoires exclus
Browse files Browse the repository at this point in the history
  • Loading branch information
hardware committed Oct 13, 2014
1 parent f01c4b0 commit ad26fa1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if [ ! -f /opt/full-backup/.excluded-paths ]; then
fi

echo -n "> Compression des fichiers système" | tee -a $LOG_FILE
tar --warning=none -cpPzf $ARCHIVE --one-file-system --exclude-from=/opt/full-backup/.excluded-paths / /var /home 2> $ERROR_FILE
tar --warning=none -cpPzf $ARCHIVE --exclude-from=/opt/full-backup/.excluded-paths / 2> $ERROR_FILE

# Si une erreur survient lors de la compression
if [ -s $ERROR_FILE ]; then
Expand Down
14 changes: 12 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,18 @@ echo ""
read -p "Voulez-vous exclure des répertoires de la sauvegarde ? (o/n) : " EXCLUDE

# Exclusion des répertoires par défaut
echo "/var/cache" > /opt/full-backup/.excluded-paths
echo "/var/backup" >> /opt/full-backup/.excluded-paths
cat > /opt/full-backup/.excluded-paths <<EOF
/dev
/lost+found
/media
/mnt
/proc
/run
/sys
/tmp
/var/cache
/var/backup
EOF

if [[ "$EXCLUDE" = "o" ]] || [[ "$EXCLUDE" = "O" ]]; then

Expand Down

0 comments on commit ad26fa1

Please sign in to comment.