[RFC] transfer files listed in a file.

Wayne Davison wayned at samba.org
Fri Dec 12 05:48:24 EST 2003


On Wed, Dec 10, 2003 at 07:49:51PM -0500, James A. Morrison wrote:
> e.g.
> rsync -f rsync.files jim at server::jim/ .
> and
> rsync -s rsync.files jim at server::jim

In CVS, both directions use the same --files-from option, and this file
can be read from either side of the connection.  e.g., these are all
equivalent, with just the difference in transport (daemon vs ssh) and
the difference of which side the rsync.files file is read:

rsync --files-from=rsync.files jim at server::jim/ .
rsync --files-from=rsync.files server:/path/jim/ .
rsync --files-from=server:/path/jim/rsync.files server:/path/jim/ .
rsync --files-from=:rsync.files jim at server::jim/ .

and

rsync --files-from=rsync.files . jim at server::jim
rsync --files-from=rsync.files . server:/path/jim
rsync --files-from=:/path/jim/rsync.files . server:/path/jim
rsync --files-from=server:rsync.files . jim at server::jim

The leading ':' is a short-hand for referring to the same server-name as
the server in the transfer (since it has to be the same name, I
recommend just prefixing the name with a colon to indicate that it is
remote).

Some differences in our implementations:

The CVS version assumes the --relative option with --files-from so that
the paths are preserved.  The --no-relative option was added to allow
you to turn this off.

The CVS version tweaks -a (--archive) to not imply -r (--recursive) when
used with --files-from.  Combined with the feature that any named
directories are created on the destination, this allows the user to use
the traditional "-av" options and get only the files and directories
specified sent to the destination system and no others (specify -ar if
you want to send named directories with recursion).

BUG:  It looks like combining --files-from with a daemon pull and a
local file-list currently hangs during the transfer of file names (it
succeeds in the other 3 modes of daemon transfer, and in all 4 modes
of remote-shell transfer).  I'll fix this.

> Other than adding those options this patch also creates a new function
> send_a_file() which makes send_file_list() a bit shorter and easier to
> read.

I'll take a look at that.  Your patch also added an "(x of y)" display
during the transfer which I will also consider (though I'd only want
such extra output in the --progress mode).

..wayne..



More information about the rsync mailing list