I'm using ubuntu server 12.04, now I want to backup some files using rsync, here is a try:
rsync -aAX $HOME/Documents/* $HOME/Backups/TEST --exclude={$HOME/Documents/another/*,$HOME/Documents/temp/*}
As you can see, I want to backup all files in the folder $HOME/Documents to folder $HOME/Backups/TEST, but exclude files in folder another and temp. But I failed, rsync still copied the files in both excluded folders:
ls $HOME/Backups/TEST/another
test
test is a file in the folder another, and it is also copied though I exclude the file in rsync, why? How to let those files be actually excluded?