0

I need to run sync over whole system and include only few dirs and files, but this command does not synchronize anything.

rsync -avxn --include='etc/php/' --include='usr/local/' --exclude='*' / server:/

I try it on Debian 10 and rsync 3.1.3

omfo
  • 39
  • 1
  • 4
  • I guess you'll need the `-r` parameter so that rsync will [recursive sync the folders](https://linux.die.net/man/1/rsync) – 0stone0 May 12 '20 at 13:24
  • Parameter `-r` is included in `-a`. Parameter `-a` equals `-rlptgoD`. – omfo May 12 '20 at 13:34
  • Based on [this answer](https://stackoverflow.com/a/26790074/5625547), try: `--include='/etc/php/**' --include='/usr/local/**' --exclude='*'` – 0stone0 May 12 '20 at 13:42
  • `--include='/etc/php/**'` I tried this and it not working too... – omfo May 12 '20 at 14:03

0 Answers0