rsync backup
Jason Shaw
grazer-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Dec 8 23:14:03 UTC 2010
This is where tab completion can really bite you in the backside. I've had
it happen several times when I'm not paying attention and just use tab to
fill in the directory for me.
To echo what others have said, -n is your friend.
On Wed, Dec 8, 2010 at 6:05 PM, Lennart Sorensen <
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> On Wed, Dec 08, 2010 at 12:38:01AM -0500, Jason Nicolaides wrote:
> > The --delete flag is not that dangerous and in this case it was doing
> > exactly what it was told to do. There is an undocumented feature, if you
> > will, of rsync for the source and destination paths having a trailing
> slash
> > or not. For the destination path, the presence or not of a trailing
> slash
> > is completely ignored and does not affect rsync in any way. It's on the
> > source that matters. If the source doesn't have the trailing slash, the
> > directory is copied along with it's contents to the destination. For
> > example, if your source is /home/jason and your destination is
> /mnt/backups
> > then after running rsync you will have /mnt/backups/jason.
>
> In rsync man page:
> 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.
>
> Looks pretty documented to me.
>
> --
> Len Sorensen
> --
> The Toronto Linux Users Group. Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20101208/b26bf157/attachment.html>
More information about the Legacy
mailing list