Rsync cannot find exclude list

rzky August 17, 2020

I'm getting this error when i'm using rsync's  `--exclude-from` option.

rsync: failed to open exclude file "./ignorelist.txt": No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1207) [client=3.1.3]

Here's my pipeline script:

branches:
develop:
- step:
script:
- ls -la
- pipe: atlassian/rsync-deploy:0.4.3
variables:
USER: $REMOTE_USER
SERVER: $REMOTE_HOST
REMOTE_PATH: $REMOTE_DIR
LOCAL_PATH: './'
DEBUG: 'true'
EXTRA_ARGS: '-avzh --exclude-from="./ignorelist.txt"'

Using `ls -la` i can clearly see the the ignorelist.txt file does exists.

---

On a side note, is it just me, or i really cannot paste multi-line code? The white space always got trimmed.

1 answer

1 accepted

0 votes
Answer accepted
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 21, 2020

Hello @rzky ,

  • as for the main question, let's investigate your root cause, because I can say exclude-from is supported by rsync-deploy pipe. When you see the pipeline running, look docker container params that it is running with. You will see the working dir the pipeline share it with pipe. Check that your file in that dir(not necessary in this root dir, rsync is working recursively)
  • look here at the example, how you could write your multi-line code Pipe multi line usage (Advanced examples)

Best regards, Galyna

rzky August 24, 2020

Hi @Halyna Berezovska

Turns out it's a syntax problem. Removing the quotes from the `--exclude-from` param fixes the problem.

So, from this:

-avzh --exclude-from="./ignorelist.txt"

 To this:

-avzh --exclude-from=./ignorelist.txt
Like # people like this
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2020

@rzky Please mark the question as answered.

Just for reference: Similar issue/solution in Way to use "---include-from" in rsync deploy , quotes were as well the issue finding the file

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events