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?

link|improve this question
feedback

3 Answers

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

link|improve this answer
feedback

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
link|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
feedback

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

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

Your Answer

 
or
required, but never shown

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