I am trying to Rsync some files and folders to a remote server with the command as:
rsync -rtOzv --partial -e ssh /media/external/Media/ user@serverip:/media/external/Media --exclude-from='/srv/mr/logs/ExcludeList.txt' --log-file=/srv/mr/logs/RSyncLog.txt
with ExcludeList.txt
containing the following:
testfolder1
test folder 2
test - folder - 3
test [folder4]
testfile1.txt
test file 2.txt
test - file - 3.txt
test [file4].txt
When I run the command, test [folder4]
and test [file4].txt
still get transferred to remote folder. How can I exclude the files/folders that contain [
or ]
in its name?