This is my first attempt at using rsync, and I think I basically have it figured out, except that something is awry with updating. My situation is that I have a desktop in another city that I will use once a week or so when I am there. I have a local computer that most work gets done on. I wanted to set rsync to run nightly with a cron job to sync data, and then promptly run again in the other direction so as to get the most update files on both computers. I thought the following would work, but it doesn't seem to. rsync -auvz --progress -e ssh account@distantcomp:~/rsync-testing /home/rob rsync -auvz --progress -e ssh ~/rsync-testing account@distantcomp:~/ The receiving computer gets its files overwritten, whether they are newer or not. The only thing I can think of (other than the more likely fact that I made some boneheaded mistake) is that the date command seems to be in a slightly different format. They are two minutes off, but I've waited far longer than that, but the CST vs. CDT thing might make a difference? Tue Apr 9 00:55:51 CST 2002 -local comp Tue Apr 9 00:58:19 CDT 2002 -distant comp Thanks for any advice, this seems like an amazing program, and I think eventually it will do exactly what I need. -Rob
On 9 Apr 2002, Robert Silge <robert.silge@utsouthwestern.edu> wrote:> They are two minutes off, but I've waited far longer than that, but > the CST vs. CDT thing might make a difference? > > Tue Apr 9 00:55:51 CST 2002 -local comp > Tue Apr 9 00:58:19 CDT 2002 -distant compCould that be central standard time vs central daylight time? What does date -u show on the two machines? -- Martin
Nevermind, I think I got it. I had the location set to Monterrey Mexico (being in Texas, that's pretty close), but methinks they don't do daylight savings there. Changing it to Chicago got me into CDT. Everything seems to be working now. Thanks for the help. -Rob On 4/9/02 1:21 AM, "Robert Silge" <rsilge@mac.com> boldly proclaimed:> Tue Apr 9 07:18:37 UTC 2002 -local > Tue Apr 9 06:21:58 UTC 2002 -distant > > well, that would explain it. It's the CST vs. CDT thing. The local comp is > always an hour ahead. Now how do I change that? I can never remember what's > standard and what's daylight. And besides, I don't have root access on the > distant machine, so I couldn't change it there anyway. So I guess I need to > figure out how to make my machine CDT? > > -Rob > > > On 4/9/02 2:00 AM, "Martin Pool" <mbp@samba.org> boldly proclaimed: > >> On 9 Apr 2002, Robert Silge <robert.silge@utsouthwestern.edu> wrote: >> >>> They are two minutes off, but I've waited far longer than that, but >>> the CST vs. CDT thing might make a difference? >>> >>> Tue Apr 9 00:55:51 CST 2002 -local comp >>> Tue Apr 9 00:58:19 CDT 2002 -distant comp >> >> Could that be central standard time vs central daylight time? What >> does >> >> date -u >> >> show on the two machines?
On 9 Apr 2002, Robert Silge <rsilge@mac.com> wrote:> Tue Apr 9 07:18:37 UTC 2002 -local > Tue Apr 9 06:21:58 UTC 2002 -distant > > well, that would explain it. It's the CST vs. CDT thing. The local comp is > always an hour ahead. Now how do I change that? I can never remember what's > standard and what's daylight. And besides, I don't have root access on the > distant machine, so I couldn't change it there anyway. So I guess I need to > figure out how to make my machine CDT?rsync, like most unix programs, works exclusively in universal time, except that times are displayed to humans in their chosen timezone. So the point is not to change the timezone of either machine, but to preferably make them both synchronized with UT. A good way to do this is with an NTP client. rsync doesn't really care if the time is correct, but if the machines are inconsistent then of course it won't be able to tell whether a file is really newer or not. -- Martin
The DST (what an idiotic idea) is probably your problem.0555 CDT is an hour earlier than 0555 CST, so you can sync from CST to CDT, change it on the CDT system, and it looks older than it was before the change, if your timezones aren't correctly implemented (keep time in GMT, display it in local). Check the output of 'date -u' on both machine. If you don't have a unix date command, use 'perl -e print time' on both ends. That will give you epoch time - seconds since midnight, January 1, 1970. If you're 5 minutes of, the difference between those two systems should be 600. If the difference is closer to 3600, you've got an hour offset. Tim Conway tim.conway@philips.com 303.682.4917 Philips Semiconductor - Longmont TC 1880 Industrial Circle, Suite D Longmont, CO 80501 Available via SameTime Connect within Philips, n9hmg on AIM perl -e 'print pack(nnnnnnnnnnnn, 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), ".\n" ' "There are some who call me.... Tim?"