LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-14-2014, 04:55 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
rsync update and date/time difference on local/remote server


Hello,

2 servers and im sincing files using rsync -u (update switch) between them.
and i want to prevent overwrite file that i editted most recently.
i want to ask if date and time is not same on 2 servers, can rsync overwrite the my recently editted file by one that was editted at earlier time? just because source server has time set lets say several hours in advance in comparison to dest. server? thx

im currently using rsync -au

i want to rsync the way that target file have same timestamp. and with oposite direction rsync later on, rsync will skip the file even if file has different size, but same time stamp (mod. date)
how to achieve this please?

Last edited by postcd; 11-14-2014 at 06:52 AM.
 
Old 11-14-2014, 12:14 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
When rsync copies a file to the destination server it does not change the time stamp on the file that it is copying. So when you run the next rsync it compares the date timestamps correctly.

---------------------
Steve Stites
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync from remote server to a local external drive arcolombo698 Linux - Software 3 06-18-2014 08:58 PM
rsync without copying files when the only difference is the time time centguy Linux - Mobile 2 12-01-2012 08:15 PM
using rsync to keep local copy of stable tree up to date chexmix Slackware 3 05-15-2011 02:59 PM
[SOLVED] RSYNC Creates New Folder Every Time (on remote server). cryingthug Linux - Server 1 09-09-2010 06:48 AM
how to use rsync to update date/time only coontie Linux - Software 2 05-15-2006 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:29 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