I am trying to use rsync to copy important files from my home folder to an external drive. I am using:
rsync -av --stats --delete --include "com~apple~CloudDocs" --exclude "Library" ${HOME} /Volumes/LaCie/ --dry-run
of course, --dry-run is just for simulation. So, I am trying to backup everything in the home folder except ~/Library but include ~/Library/Mobile\ Documents/com~apple~CloudDocs
However the --include doesn't work, everything under ~/Library is excluded.
Anyone has any idea how to fix this?
rsync -av --stats --delete --include "com~apple~CloudDocs" --exclude "Library" ${HOME} /Volumes/LaCie/ --dry-run
of course, --dry-run is just for simulation. So, I am trying to backup everything in the home folder except ~/Library but include ~/Library/Mobile\ Documents/com~apple~CloudDocs
However the --include doesn't work, everything under ~/Library is excluded.
Anyone has any idea how to fix this?