I've learned that with the -i
option, I can get rsync to list all the changes it makes. I've been using it along with the -n
or --dry-run
options so that I can always learn about all expected changes prior to actually executing them.
I've been using rsync mainly to sync my home directories on my two computers, both of which are connected to a network. Often times I need to move just a small number of relatively small files. If this is the case, rsync spends more time going through all the files it's going to exclude from the transfer rather than actually transferring the actual changed files.
Now if I follow this procedure where I first do a dry run and list all the changes, and then actually proceed, the longest part of calculating the files that are to be excluded from the transfer gets done two times.
I'd like to cut it to just one. Is there a way to feed the itemized list of changes created by the dry run back to rsync so that the live run is faster or do something to that effect?
Best Answer
from the man page of
rsync
:so run
rsync -i
first and output it to a file and use--files-from
option or you can usefind
utility for finding the last modified file and thenrsync
them. see https://serverfault.com/questions/115945/synchronizing-very-large-folder-structures