Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: RSYNC is not preserving time stamps openSUSE 11.4

  1. #1
    Join Date
    Aug 2008
    Location
    Maryland
    Posts
    208

    Default RSYNC is not preserving time stamps openSUSE 11.4

    Hello,

    I use mirror.pl to create a local copy of the openSUSE repos. I then use RSYNC to copy to a secondary server. I have noticed that the time stamps on the secondary server do not match my main download copy.

    I wrote a script that compares timestamps between my servers.

    Code:
    i586/dhcp-devel-4.2.4.P2-0.1.4.1.i586.rpm
                                    Left                                    Right
            Birth                   0                                       0
            Modified                1351012521                              1348562700      Differ
            Accessed                1348562700                              1348562700
            Changed                 1351012521                              1350040218      Differ
            Modified Human          2012-10-23 13:15:21.000000000 -0400     2012-09-25 04:45:00.000000000 -0400
            MD5Sum                  8b382a45dc5181df741f103401e917f6        8b382a45dc5181df741f103401e917f6
    RSYNC command
    Code:
    rsync -rlpt /atlas/Distributions/openSUSE/ colossus:/colossusRaid/Distributions/openSUSE/ --delete-after -hi --stats
    I even tried to add --times to the end of the command. I tested by deleting the 12.2 OSS Updates directory and running the rsync again.

    I did not see anything in the man page that says that -t/--times only works when the RSYNC demon is running. I know that "Changed" is the entry in the file system and RSYNC will not preserve that. But RSYNC is preserving Accessed time, so how come it is not preserving Modified time?

    Thanks

    Dave W

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,815
    Blog Entries
    3

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    I have never had problems with time and rsync, including when I was using 11.4.

    That said, the time sync does not work if the destination file system is NTFS, unless the process doing the update has sufficient permissions. That's an NTFS restriction, not an "rsync" problem.

    I'm not sure about other file systems. As far as I know, you should be fine with standard unix file systems.

    On my own computers, when copying to NTFS, I must either do it as root, or I must use mount options so that I am the file owner, if I want to be able to set the time.

    Check what type of file system is being used on the destination.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: RSYNC is not preserving time stamps openSUSE 11.4

    For anyone that does not know how to use rsync, but would like to have their own local openSUSE repository sever, have a look at my bash script here:

    S.L.R.C. - SuSE Local Repository Creator - Version 1.24 - Now for Packman & openSUSE 12.2 & 12.1 - Blogs - openSUSE Forums

    Don't work harder, do it smarter with openSUSE and bash.

    Thank You for using openSUSE,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4
    Join Date
    Aug 2008
    Location
    Maryland
    Posts
    208

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    The file system is XFS on both sides.

  5. #5
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    Quote Originally Posted by dwestf View Post
    The file system is XFS on both sides.
    My questions would be: 1) Why use XFS over EXT4? What problem does the time difference cause? Have you considered trying different PC's to see if you get the same result? Ether the problem is the process you follow or the file system that you have selected or there is no problem because it would do the same thing everywhere.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    On 2012-10-24 23:16, jdmcdaniel3 wrote:
    >
    > dwestf;2498551 Wrote:
    >> The file system is XFS on both sides.

    >
    > My questions would be: 1) Why use XFS over EXT4? What problem does the
    > time difference cause? Have you considered trying different PC's to see
    > if you get the same result? Ether the problem is the process you follow
    > or the file system that you have selected or there is no problem because
    > it would do the same thing everywhere.


    The filesystem will not be the cause, as long as it is a Linux
    filesystem. If it were, it would be a severe bug.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" (Minas Tirith))

  7. #7
    Join Date
    Aug 2008
    Location
    Maryland
    Posts
    208

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    Quote Originally Posted by jdmcdaniel3 View Post
    Why use XFS over EXT4?
    1, Two reasons, one I have always found that an XFS partition repairs itself faster then ext3, two don't have to wait hours for the system to check itself if I reboot it in two months. Have not tested ext4 yet.

    Quote Originally Posted by jdmcdaniel3 View Post
    What problem does the time difference cause?
    This problem started when I was seeing a large number of files being downloaded from mirror.anl.gov using mirror.pl, but was only seeing a few updates. I don't have RSYNC access, firewall rules.
    I had problems with the openSUSE mirror before, different versions of rpm were being introduced into the mirror and not matching repodata. I wrote a oneliner that would compare the RPM's on the secondary copy server to the main download. This would tell me what RPM's were replaced in the repo.
    So using this, I was not see any difference in the RPM's that were being downloaded. That is when I noticed that timestamps were changing at anl.gov. Drafting an email to anl.gov right now. I am just trying to get all copies to match up.

    I wounder if this is the same problem as before but instead of different versions it is the same file but different time stamps. I just did a mirror -T and one of the files that got a timestamp update was flashplayer from April. Why would an RPM from April change its time stamp today. I ran mirror -T twice yesterday.

    Dave W

  8. #8
    Join Date
    Aug 2008
    Location
    Maryland
    Posts
    208

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    Found an error in my timestamp script. I transposed X and Y in the stat command and was switching access and modified time. So what I am seeing between my two servers is that access time is different. I guess rsync does not preserve access time.

    Thanks for the help.

    Dave W

  9. #9

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    dwestf wrote:
    > Found an error in my timestamp script. I transposed X and Y in the stat
    > command and was switching access and modified time. So what I am seeing
    > between my two servers is that access time is different. I guess rsync
    > does not preserve access time.


    FWIW, I mount all my data filesystems with noatime anyway Can speed
    things up quite a bit, depending on what you're doing.

  10. #10
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    1,926

    Default Re: RSYNC is not preserving time stamps openSUSE 11.4

    Quote Originally Posted by dwestf View Post
    Found an error in my timestamp script. I transposed X and Y in the stat command and was switching access and modified time. So what I am seeing between my two servers is that access time is different. I guess rsync does not preserve access time.

    Thanks for the help.

    Dave W
    I always use "rsync -avin src dst" in order to see what is happening. I think "rsync -rlptin" could help to see what is happening exactly as well.
    Best regards,
    Greg

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •