Score:1

rsync using --delete-excluded flag is still showing content in destination

ng flag

I'm using rsync with --delete-excluded flag but I still see contents in the destination folder. I'm trying to exclude and delete excluded cache from all chromium like browsers. Here's what I'm doing

rsync -av --delete --exclude-from='exclude.txt' --delete-excluded /home/user /media/user/extDrive/backup/
the exclude.txt:
**/Default/Cache/**

I've also tried:

**/Default/Cache/

But I'm still seeing contents inside Default/Cache at the destination. It seems to be excluded correctly, but it's not deleting the contents from the destination.

Any ideas?

Doug Smythies avatar
gn flag
rsync can be finicky with the top level directory of the source and destination. Please edit your question with the exact source and destination syntax you are using. For example I had to change this `rsync --delete-excluded --archive --verbose --exclude-from=exclude_files /mnt/c/Users/dsmyt/* doug@s19.smythies.com:/media/sdb/backup/s18-windows` to this `rsync --dry-run --delete-excluded --archive --verbose --exclude-from=exclude_files /mnt/c/Users/dsmyt doug@s19.smythies.com:/media/sdb/backup/s18-windows` to get it to work properly.
positivetypical avatar
ng flag
ok, i edited to match. should i have used the --delete-excluded flag before my orgin position? wonder if that has anything to do with it.
Doug Smythies avatar
gn flag
Try changing the contents of `exclude.txt` from this `**/Default/Cache/**` to this `Default/Cache`.
positivetypical avatar
ng flag
wouldnt that just exclude 1 folder, namely /home/user/Default/Cache. from destination. the exclude while syncing seems to work correcly in globbing all folders with the path pattern containing 'Default/Cache' in all my folers as i have my browser profiles in a lot of different folders. i just dont know why its not dissappearing on the destination's end.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.