Newbie question.

William D. Tallman wtallman at olypen.com
Mon Mar 12 01:49:15 GMT 2007


On Sun, Mar 11, 2007 at 03:16:13PM -0700, Wayne Davison wrote:
> On Sat, Mar 10, 2007 at 01:29:45PM -0800, William D. Tallman wrote:
> > And I got it that I could remove -t and --size-only from subsequent
> > backup runs.
> 
> No, you don't want to eliminate -t, as preserving timestamps is the only
> way rsync has to quickly decide if a file is changed or not (if you had
> used -p with the initial cp command, you couldn't have needed to use
> --size-only).  I'd also suggest adding -p (--perms), if needed.  See
> also -g (--group) and -o (--owner), which might be needed.

I didn't use any switches with 'cp', and doubtless should have.  But
this should set things straight, I gather.  And I wonder about keeping
the -t, which is why I mentioned it.  Good call!

Now, I hadn't thought of the permissions; I'm doing all this as root, of
course, and hadn't even considered them.  I see that root now owns all
of my $HOME files, which isn't really a problem now, but if I ever have
to swap drives for any reason, I'll have a lot of house-cleaning to do.

If I now use -p, -o, and -g, will that resolve this problem?

> > And what I don't seem to be able to figure out is how to get rsync to
> > give me a list of the files it updates or backs up.  I thought a single
> > -v would do that, but apparently not.
> 
> Yes, that's what happens.  Perhaps you left off -t from one copy, and
> noticed that rsync re-copied the older files (due to them not having
> their timestamp preserved).  You can use -i (--itemize-changes) to see
> an itemized list of what rsync is changing, and what caused a transfer
> to happen.

Aha.  I will pipe all that to a log file, as I want to run this all as a
chron job and will want that information available.  Does -i cover all
the info in --stats, or should I run both?

Thanks for your response and I will almost certainly have more
questions.

Best,

Bill Tallman



More information about the rsync mailing list