Hi,

Thanks very much for the new info! It seems that you were right on the money
with what I had been trying to do and also, your suggestion of using
--relative switch can become useful, and I will implement it in my rsync
code.

I'll update you on this issue later on.

Shai

On 2/4/07, Matt McCutchen <[EMAIL PROTECTED]> wrote:

On 2/2/07, Shai <[EMAIL PROTECTED]> wrote:
> The new Debian Sarge server I built is using 2.6.9 version of rsync
which
> before, was not that new. It used to work fine (as far as I can tell
you)
> that sending a single file, would also create the directory if it did
not
> exist. Am I wrong to say this? Ever since the new server came up, rsync
> failed when I sent this file first before the directory was there.

This confuses me.  You imply that the problem began when you upgraded
the destination rsync daemon to 2.6.9.  However, you said earlier that
you were having the problem before with rsync 2.6.4, and the error
message you pasted (which is given only by a receiving rsync 2.6.6 or
older) seems to confirm that.

> I don't want to send the entire directory, since it contains many other
> files that don't interest me and whice would slow down my cycles.

No, with my proposed command, rsync will still send only the single
file because its name is still given in the *source* path:
    rsync -av --timeout 120 /home/20070129_1012/status.csv --port 5873 \
        fileserver::test/20070129_1012/
This command has exactly the same effect as your original command,
except that the receiver will create the directory 20070129_1012/ if
necessary.  I think this is what you want.

If you also removed the file name from the source path, only then
would rsync send the entire directory:
    rsync -av --timeout 120 /home/20070129_1012/ --port 5873 \
        fileserver::test/20070129_1012/

I notice that you are duplicating a suffix of the source path,
"20070129_1012/", inside the destination.  An alternative to writing
this directory explicitly in the destination path is to use --relative
like this (if the sending rsync is at least 2.6.7):
    rsync -av --timeout 120 -R /home/./20070129_1012/status.csv --port
5873 \
        fileserver::test/
The advantage to this approach is that, if in the future the common
suffix had multiple directories (e.g., "2007/0129/1012/" instead of
"20070129_1012/"), rsync would create them all on the destination if
necessary, instead of just the last.

Matt

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to