1

so it seems like there are others with the same problem, but I couldn't find the right solution for myself. What I want to do: Rsync all files with pattern .log. but exclude a directory

Here is my rsync command:

rsync --include=*/ --include=*.log.*  --exclude=* --exclude=folder1/ -armte "ssh -o StrictHostKeyChecking=no" user@server:/path/log/ /tmp/rsynctest/

So in /path/log are multiple subfolders. /path/log/folder0 /path/log/folder1 /path/log/folder2 etc. And I want to exclude one of them (folder1). But rsync is still syncing this folder. I'm not really sure what I'm doing wrong.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
M.S.
  • 177

0 Answers0