0

I am trying to build a list of files to be excluded.

The absolute path works fine! But when I try to use the relative path. I get the following error:

rsync: failed to open exclude file exclude-list: No such file or directory (2)rsync error: error in file IO (code 11) at exclude.c(1178) [client=3.1.2]

the exclude-list is the file name. It is in the source directory at the root

My syntax is

rsync -av --delete --exclude-from='exclude-list'  /source /destination

I would appreciate any help

bdkdavid
  • 203
  • 3
  • 14
  • 1
    Exclude and include *rules* are resolved relative to the root of the transfer, but finding *rule files* (e.g. `--exclude-from='exclude-list'`) is done relative to the working directory of the `rsync` process (which it inherits from the process that ran it). You need to use `--exclude-from='/source/exclude-list'` – Gordon Davisson May 01 '21 at 00:29
  • Great! explanation! I created a new directory: moved file into that directory: cd command into that directory: ran command from that directory: IT WORKS! Thank You! – bdkdavid May 01 '21 at 11:36

1 Answers1

0

Great! explanation from Gordon Davisson!

  1. I created a new directory
  2. mkdir mydir
  3. moved file into that directory:
  4. cd command into that directory:
  5. ran command from that directory:
  6. IT WORKS!
bdkdavid
  • 203
  • 3
  • 14