protocol errors when using --dryrun

Bryan Ross bryan at
Thu May 23 04:17:02 EST 2002

Hi there,

I've had a look on the web, and in the archives, but I dont see any mention
to this problem/feature. Essentially, I have a local mirror, and a live
webserver, with a little script that will execute a --dryrun rsync, ask the
user for confirmation, then go ahead and transfer the local updates to the
live server.

The problem Im having is when Im sync'ing newly generated directories. The
dryrun command fails, spews, then complains about unexpect connection

Here's my dryrun command;

rsync --rsh=ssh --blocking-io --compress --archive --update --checksum --del
ete --verbose --dry-run /var/www/

In this example, /var/www/ exists on both the local and
live server. However, we have made a new directory on the local server
(newdir), so we want that created, and its contents transferred. Here is
what rsync (dryrun) makes of it;

building file list ... done
created directory /var/www/
rsync: push_dir /var/www/ No such file or
rsync error: errors selecting input/output files, dirs (code 3) at
rsync: connection unexpectedly closed (8 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)

Now, my assumption is that it is reporting that it cant copy the contents of
/var/www/ to the remote server because we only
pretended to create the newdir command, so subsequent updates within that
directory will fail -after all, it doesn't exist.

As you would imagine, if I perform the same rsync command without
the --dryrun parameter, everything works correctly - I assume because
directories are made, so subsequent file uploads work properly.

So, is there any way to get --dryrun to simulate what would happen more
accurately. Eg, it remembers that it would have created the 'newdir'
directory, so 'newdir/newfile' would be okay. Or I am completely off-base?

Thanks in advance,


More information about the rsync mailing list