--delete-excluded not working in rsync
by peter7089 from LinuxQuestions.org on (#5S1BN)
I am using rsync to backup my home directory to external hard disk. I want to exclude some directories from the backup and delete them from the backup folder so i added the option --delete-excluded, but it doesn't seem to work because it doesn't delete the excluded directories. This is the command i use:
Code:sudo rsync -aAXv --delete --delete-excluded --exclude=/home/user/.local/share/Trash/* /home/user/ /media/user/ExternalHDD/Backup/
Code:sudo rsync -aAXv --delete --delete-excluded --exclude=/home/user/.local/share/Trash/* /home/user/ /media/user/ExternalHDD/Backup/