2000-10-30-12:26:00 Paul D. Smith:
> I figured out the problem. My arguments to rsync were causing the
> remote tree to be reconstructed one level down from where I wanted
> it to go [...]
Hooray! Congratulations! Glad your problem isn't any more.
For whatever it's worth --- and not to disagree with any of your
suggestions for trying to make it easier for others to dodge this
problem in the future --- I've settled on a practice that has
radically cut down on my mistake rate when doing rsyncs of whole
directories. I follow some simple rules:
- when doing recursive copies, I always pre-create the target
directory before invoking rsync, and specify it with a trailing
slash on the cmdline, and
- I specify the src directory with a trailing /.
So I do pulls like
rsync -vaz... remotehost:/path/to/. ./
and pushes like
rsync -vaz... /path/to/. remotehost:/path/to/
The "." (and everything underneath it) is getting copied into the
dir with the slash on the end. I dunno, somehow this works for my
brain. I got into the habit after a rather younger (and scarier,
they've tamed it a bit since:-) rsync with --delete succeeded in
doing _way_ more deletion than I'd planned. Sure, I also try and
always use -nv for a trial run first, but I somehow have more
confidence that it's gonna do what I intend when I express the
copies this way.
-Bennett
PGP signature