Skip to content

Commit

Permalink
exclude plex
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerboy448 authored May 31, 2024
1 parent 21030eb commit 06b9429
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion backup_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06b9429

Please sign in to comment.