I tried the command:

 rsync -v --include-from=/path/to/list.lst /home/user /path/to/backup

list.lst contains for example








and I get error on all strings with:

failed: No such file or directory

When I use --files-from for this, I get an error too. Can anybody help me use wildcards for this?


You can go with include filters and --include-from: Complex includes/excludes with rsync

Or you can go with a find command:

rsync -v --files-from <(find gnupg/ .pki/ .gnome2/keyrings/ \
  .mozilla/firefox/*.default/bookmarkbackups/ \
  .mozilla/firefox/*.default/bookmarks.html .mozilla/firefox/*.default/*.db \
  .mozilla/firefox/*.default/*.sqlite) \
 ~ /path/to/backup
  • Must i use "find + cat" when i have list.lst with paths to files and directories? Can you give me an example? – Edward Jun 11 '10 at 15:16
  • I gave you an example. There is no cat, instead the list.lst was rewritten so that the shell matches your globs. If you rewrite list.lst into rsync filter rules, rsync will do the matching. – Tobu Jun 11 '10 at 15:32

I think you may need to add the --recursive option and use --files-from.


I think the file name in your list.lst must start with + or - like:

- *.o
- foo/
+ *.exe
+ 123/456/*

One possible solution is described in the following web page. It looks like that error line is misleading, check the "code" error that comes latter.



I have similar problem with "(code 23)" but I am still don't know why or how to fix it. If I put the files to transfer (foo*.xml) in the command line rather than in the --files-from file, it works. I am starting to think that --files-from does not like patterns with asterisks, question marks, etc. Perhaps I need to use --include-from, the problem is that I found --include-from confusing to include and exclude files.

0 Success 1 Syntax or usage error 2 Protocol incompatibility 3 Errors selecting input/output files, dirs 4 Requested action not supported: an attempt was made to manipulate 64-bit files on a platform that cannot support them; or an option was specified that is supported by the client and not by the server. 5 Error starting client-server protocol 6 Daemon unable to append to log-file 10 Error in socket I/O 11 Error in file I/O 12 Error in rsync protocol data stream 13 Errors with program diagnostics 14 Error in IPC code 20 Received SIGUSR1 or SIGINT 21 Some error returned by waitpid() 22 Error allocating core memory buffers 23 Partial transfer due to error 24 Partial transfer due to vanished source files 25 The --max-delete limit stopped deletions 30 Timeout in data send/receive 35 Timeout waiting for daemon connection

  • We really do prefer that answers contain content not pointers to content. Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Link-only answers can become invalid if the linked page changes. – masegaloeh Dec 9 '14 at 15:01

Make sure the lines in the /path/to/list.lst do not have blank spaces at the end of the line. I don't know why rsync is so sensitive to that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.