LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-15-2006, 10:40 AM   #1
coontie
Member
 
Registered: Jun 2003
Distribution: Fedora Core 5
Posts: 100

Rep: Reputation: 15
how to use rsync to update date/time only


Hi, everybody. I've 2 machines and I rsync data from a->b. I accidentally reset the modification times (recursively) on the entire /home/user directory on A. Now, whenever I try to rsync a->b it wants to rsync everything, since every file on A has now become older than the exact same file on B. Switching to checksum-based rsyncing is not an option because it literally takes over 8 days to process the files.

I'm thinking there's got to be a way to use rsync to go b->a, setting all the modification datetime on A to match those on B.

Any way to do that?

Thanks in advance..
 
Old 05-15-2006, 11:08 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Since rsync uses the timestamp and filesize to determine what has to be transferred, transferring only the timestamp would be a nonsensical operation for rsync.

You'll need to create a script to reset the timestamps on the files, using an ls/find output from the source system as a data source. You can reset a file's modification timestamp with the touch command.
 
Old 05-15-2006, 11:13 AM   #3
coontie
Member
 
Registered: Jun 2003
Distribution: Fedora Core 5
Posts: 100

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by macemoneta
Since rsync uses the timestamp and filesize to determine what has to be transferred, transferring only the timestamp would be a nonsensical operation for rsync.

You'll need to create a script to reset the timestamps on the files, using an ls/find output from the source system as a data source. You can reset a file's modification timestamp with the touch command.

yea, that's what I figured.

thx.
 
  


Reply

Tags
rsync


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot set time/date to other time zone than UTC (Kubuntu) jamangold Ubuntu 1 12-23-2005 05:42 PM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM
date and time osheasf Linux - Software 1 06-15-2005 07:47 AM
Display the date and time from another time zone lothario Linux - Software 4 07-31-2004 03:27 PM
Date and time. vexer Slackware 2 08-13-2003 10:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration