From 06b94297032768d9de7812fc818b957d6a8250b0 Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Fri, 31 May 2024 10:25:36 -0500 Subject: [PATCH] exclude plex --- backup_config.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backup_config.sh b/backup_config.sh index f754dd8..5c55976 100755 --- a/backup_config.sh +++ b/backup_config.sh @@ -7,7 +7,18 @@ REMOTE_BACKUP_DIR="/mnt/backup-server/.config" LOG_FILE="/var/log/rsync-config-backup.log" TIMESTAMP=$(date +'%Y-%m-%d_%H%M%S') ARCHIVE_NAME="config_backup_$TIMESTAMP.tar.gz" -EXCLUDE_PATTERNS=('--exclude=*.jpg' '--exclude=*.jpeg' '--exclude=*.png' '--exclude=*.gif' '--exclude=*.mp3' '--exclude=*.mp4' '--exclude=*.avi' '--exclude=*.mkv' '--exclude=*.flac') +EXCLUDE_PATTERNS=( + '--exclude=*.jpg' + '--exclude=*.jpeg' + '--exclude=*.png' + '--exclude=*.gif' + '--exclude=*.mp3' + '--exclude=*.mp4' + '--exclude=*.avi' + '--exclude=*.mkv' + '--exclude=*.flac' + '--exclude=plexmediaserver/*' +) # Create the archive in /tmp tar -czvf "$TEMP_BACKUP_DIR/$ARCHIVE_NAME" "${EXCLUDE_PATTERNS[@]}" -C "$SOURCE_DIR" . > "$LOG_FILE" 2>&1