Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I try command

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

list.lst contains for example

.gnupg/

.pki/

.gnome2/keyrings/

.mozilla/firefox/*.default/bookmarkbackups/

.mozilla/firefox/*.default/bookmarks.html

.mozilla/firefox/*.default/*.db

.mozilla/firefox/*.default/*.sqlite

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?

share|improve this question

5 Answers 5

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

share|improve this answer

You can go with include filters and --include-from: http://serverfault.com/questions/150269/complex-includes-excludes-with-rsync

Or you can go with a find command:

cd
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
share|improve this answer
    
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 the file name in your list.lst must start with + or - like:

- *.o
- foo/
+ *.exe
+ 123/456/*
share|improve this answer

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.

share|improve this answer

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.

http://kenfallon.com/rsync-mkstemp-failed-no-such-file-or-directory-2/

https://access.redhat.com/solutions/60592

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

share|improve this answer
    
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 at 15:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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