How to rsync only a specific list of files? -


i've 50 or files in various sub-directories i'd push remote server. figured rsync able me using --include-from option. without --exclude="*" option, files in directory being synced, option, no files are.

rsync -avp -e ssh --include-from=deploy/rsync_include.txt --exclude=* ./ root@0.0.0.0:/var/www/ --dry-run 

i'm running dry , 0.0.0.0 replaced ip of remote server. contents of rsync_include.txt new line separated list of relative paths files want upload.

is there better way of doing escaping me on monday morning?

you might have easier time, if you're looking specific list of files, putting them directly on command line instead:

# rsync -avp -e ssh `cat deploy/rsync_include.txt` root@0.0.0.0:/var/www/ 

this assuming, however, list isn't long command line length problem , rsync_include.txt file contains real paths (i.e. no comments, , no regexps).


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -