Print .tarignore Backup Shell Script

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

I think this is a tar question rather than an rclone question.

I'd try the -v flag and add more vs until you get the output you want.

   -v, --verbose
          Verbosely list files processed.  Each instance of this option on
          the command line increases the verbosity level by one.  The max‐
          imum  verbosity  level  is  3.  For a detailed discussion of how
          various verbosity levels affect tar's output,  please  refer  to
          GNU Tar Manual, subsection 2.5.1 "The --verbose Option".

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.