I can't get rsync --exclude-from to work with a file

baxx

Here's the command :

rsync -avAX --exclude-from=rsyncexclude.txt ./some_tests/ ./back_to_me/

Here's the contents of the exclude file :

/some_tests/musik/
/some_tests/notthis/

I've tried the command from the Arch page - can't get that to work with the {} exclude either.

Not sure what to do, I'm not getting error messages, the directories exist. The directories that I don't want to be copied (that are on the txt file) are being copied.

goldilocks

The root (/) of an absolute path in an rsync exclude file refers to the top level of the source directory. So if ./some_tests/ has an internal hierarchy that includes another some_tests subdirectory, then what you have should work. I.e., ./some_tests/some_tests/musik/ should be excluded.

However, if what you meant was ./some_tests/musik/, then you should use:

/musik/

Not /some_tests/musik/.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related