I am trying to backup raspbian onto itself following this stackexchange post but it seems the exclude from flag doesnt work,
This is the command I am using
sudo rsync -avH --delete-during --delete-excluded --exclude-from=/home/pi/Desktop/rsync-exclude.txt / /media/usb0/pi_backup/
and this is my rsync-exclude.txt file.
/proc/*
/sys/*
/dev/*
/boot/*
/tmp/*
/run/*
/mnt/*
/data/*
/media/*
.Trashes
._.Trashes
.fseventsd
.Spotlight-V100
.DS_Store
.cache
.AppleDesktop
.AppleDB
Network Trash Folder
Temporary Items
lost+found
.bash_history
/etc/fake-hwclock.data
/home/pi/pydio-core-6.2.2.tar.gz
/var/lib/rpimonitor/stat/
/home/pi/.cache/
/media/usb0/
/home/pi/.kodi/addons/
/home/pi/Library/Application Support/Plex Media Server/
and this is the command I am using now that is resulting what above you can see
shopt -s dotglob; sudo rsync -auvoltH --devices --delete-during -E --stats --progress --exclude "/home/pi/pi_backup2/home/kodi/.kodi/userdata/Thumbnails/" --exclude "/media/" --exclude "/home/pi/.cache/" --exclude "/home/pi/Library/Application Support/Plex Media Server/" --exclude "/home/kodi/.kodi/addons/" --log-file=/home/pi/Desktop/backup.log --delete-excluded --exclude-from "/home/pi/Desktop/rsync-exclude.txt" / /media/usb0/pi_backup/