I have a script which copies files from remote server to local filesystem and processes them locally. Files on remote server are cleaned periodically so that every once in a while the remote directory is empty just after old files are removed. If I run my script it fails with error mentioned below. The ugly workaround I use is to 'touch foo' on remote server so that there's *anything* to make rsync happy. The rsync behavior in such situation is totally wrong. What's wrong with trying to sync an empty (existing!) directory? Currently it looks like it tries to know better what user wants than user himself :/ Here is how it looks like: rsync -v --recursive --rsh="ssh" login@host:* dest_dir receiving file list ... link_stat "/home/login/*" failed: No such file or directory done client: nothing to do: perhaps you need to specify some filenames or the --recursive option? rsync error: partial transfer (code 23) at main.c(594) Such behavior makes rsync usage in a script painful and is obvious bug. Usually it's considered perfectly fine condition if command has nothing to do :) Regards, Max
On Tue, Sep 28, 2004 at 03:57:06PM +0200, Max Gilead wrote:> rsync -v --recursive --rsh="ssh" login@host:* dest_dir > receiving file list ... link_stat "/home/login/*" failed: No such file > or directoryThis isn't an rsync problem, this is a shell-induced problem due to you using a wildcard that doesn't match anything (the same thing would happen using "cp", for instance). Just drop the '*' and rsync will copy the source directory directly. ..wayne..