I'm using a .tarignore script to archive and backup files and folders and upload them via rclone.
I use a .tarignore
fole to ignore directory patterns during the backup \
It's gone well so far, but since it uses patters rather than explicitly ignoring certain directories, i'd like an output somewhere showing which folders the .tarignore found and excluded during the backup. \
/data/bin/backup.sh
#!/bin/bash
RCLONE_CONFIG=/opt/rclone/rclone.conf
export RCLONE_CONFIG
if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then exit; fi
/bin/tar -c --exclude-ignore=/data/.tarignore -vjf /data/backups/backup.tar.bz2 /data/
/usr/bin/rclone move cloud:data/backups/backup.tar.bz2.1 cloud:data/backups/backup.tar.bz2.2
/usr/bin/rclone move cloud:data/backups/backup.tar.bz2.bz2 cloud:data/backups/backup.tar.bz2.1
/usr/bin/rclone move --log-file /opt/rclone/logs/upload.log -v --use-mmap --user-agent rclone --fast-list --config /opt/rclone/rclone.conf /data/backups/backup.tar.bz2 cloud:data/backups/
find /data/backups/* -empty -type d -delete
/data/.tarignore
.cache
Cache
Media
Metadata
metadata
MediaCover
audio_cache
cache
transcode
backups