Skip to content

Commit

Permalink
Backups now exclude the backup location by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
n44h committed Sep 10, 2022
1 parent e6c180b commit 8fa7e58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ function create_backup {
command+=("--exclude=$CWD")
fi

# Exclude the Backup Location directory.
command+=("--exclude=$BACKUP_LOC")


# Create the backup as a compressed tar archive
# -c creates a tar archived file
Expand All @@ -94,7 +97,7 @@ function create_backup {
BACKUP_FILENAME="${FILENAME_PREFIX}${BACKUP_TIMESTAMP//[ ]/_}"

# The destination where the backup file will be stored.
BACKUP_DESTINATION="${BACKUP_LOC}${BACKUP_FILENAME}.tar.gz"
BACKUP_DESTINATION="${BACKUP_LOC}/${BACKUP_FILENAME}.tar.gz"

# Adding backup destination to command.
command+=("$BACKUP_DESTINATION")
Expand Down

0 comments on commit 8fa7e58

Please sign in to comment.