Re: Verzeichnis ..t bei rsync
On Thu, May 25, 2006 at 10:33:01PM +0200, Rüdiger Noack wrote:
> Mein Kommando lautet sinngemäß:
>
> $ rsync -e ssh -avzH TESTDIR server:DIR
Dein Problem könnte der folgende subtile Punkt sein:
rsync -e ssh -avzH TESTDIR server:DIR
kopiert TESTDIR als Subdirectory nach DIR, synchronisiert also TESTDIR mit
DIR/TESTDIR während
rsync -e ssh -avzH TESTDIR/ server:DIR
den Inhalt von TESTDIR mit DIR synchronisiert. Der "slash" bei "TESTDIR/"
macht den feinen Unterschied. Steht auch so in der Manpage:
A trailing slash on the source changes this behavior to avoid creating an
additional directory level at the destination. You can think of a
trailing / on a source as meaning "copy the contents of this directory"
as opposed to "copy the directory by name", but in both cases the
attributes of the containing directory are transferred to the containing
directory on the destination. In other words, each of the following
commands copies the files in the same way, including their setting of the
attributes of /dest/foo: [...]
RTFM lohnt sich, wenn eine FM wie bei rsync vorhanden ist ;-)
--jc
--
Ignorance more frequently begets confidence than does knowledge.
-- Charles Darwin
Reply to: