Does rsync completely overwrite files with different timestamps?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I've used a command similar to this to rsync files from macOS to Linux:



rsync -avz <ip-address>:/Backup/ Backup/


The folder Backup/ was previously copied from the same machine using scp, with no files changed. I thought that rsync would be a noop, but it started to overwrite all files (probably, because of different timestamps), causing a lot of disk writes. I've tried the same command with --size-only and it finished almost instantly. Does rsync completely overwrite the files that have different timestamps (i.e. not checking the difference)? Does it depend on the size of the files?










share|improve this question



























    up vote
    -1
    down vote

    favorite












    I've used a command similar to this to rsync files from macOS to Linux:



    rsync -avz <ip-address>:/Backup/ Backup/


    The folder Backup/ was previously copied from the same machine using scp, with no files changed. I thought that rsync would be a noop, but it started to overwrite all files (probably, because of different timestamps), causing a lot of disk writes. I've tried the same command with --size-only and it finished almost instantly. Does rsync completely overwrite the files that have different timestamps (i.e. not checking the difference)? Does it depend on the size of the files?










    share|improve this question

























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I've used a command similar to this to rsync files from macOS to Linux:



      rsync -avz <ip-address>:/Backup/ Backup/


      The folder Backup/ was previously copied from the same machine using scp, with no files changed. I thought that rsync would be a noop, but it started to overwrite all files (probably, because of different timestamps), causing a lot of disk writes. I've tried the same command with --size-only and it finished almost instantly. Does rsync completely overwrite the files that have different timestamps (i.e. not checking the difference)? Does it depend on the size of the files?










      share|improve this question















      I've used a command similar to this to rsync files from macOS to Linux:



      rsync -avz <ip-address>:/Backup/ Backup/


      The folder Backup/ was previously copied from the same machine using scp, with no files changed. I thought that rsync would be a noop, but it started to overwrite all files (probably, because of different timestamps), causing a lot of disk writes. I've tried the same command with --size-only and it finished almost instantly. Does rsync completely overwrite the files that have different timestamps (i.e. not checking the difference)? Does it depend on the size of the files?







      linux osx rsync






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 mins ago

























      asked 1 hour ago









      Eugene Yarmash

      4,53382845




      4,53382845




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          read the fine manual of rsync:



           It is famous for its
          delta-transfer algorithm, which reduces the amount of data sent over
          the network by sending only the differences between the source files
          and the existing files in the destination.


          I think you're getting read i/o, not write. Are you sure in rsync overwrite the files and not only scanning the content of them?






          share|improve this answer




















          • I don't think this quote illustrates what you want it to, since regardless of what goes over the network traffic it could still rewrite the files locally (which it has to do when there are changes).
            – Michael Homer
            27 mins ago










          • Yes, I'm sure (I checked with iotop). I know about the delta-transfer algoritm, the question was why it didn't work.
            – Eugene Yarmash
            8 mins ago










          • Because the files are really different? Check them with md5sum.
            – Ipor Sircer
            6 mins ago










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479649%2fdoes-rsync-completely-overwrite-files-with-different-timestamps%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          read the fine manual of rsync:



           It is famous for its
          delta-transfer algorithm, which reduces the amount of data sent over
          the network by sending only the differences between the source files
          and the existing files in the destination.


          I think you're getting read i/o, not write. Are you sure in rsync overwrite the files and not only scanning the content of them?






          share|improve this answer




















          • I don't think this quote illustrates what you want it to, since regardless of what goes over the network traffic it could still rewrite the files locally (which it has to do when there are changes).
            – Michael Homer
            27 mins ago










          • Yes, I'm sure (I checked with iotop). I know about the delta-transfer algoritm, the question was why it didn't work.
            – Eugene Yarmash
            8 mins ago










          • Because the files are really different? Check them with md5sum.
            – Ipor Sircer
            6 mins ago














          up vote
          0
          down vote













          read the fine manual of rsync:



           It is famous for its
          delta-transfer algorithm, which reduces the amount of data sent over
          the network by sending only the differences between the source files
          and the existing files in the destination.


          I think you're getting read i/o, not write. Are you sure in rsync overwrite the files and not only scanning the content of them?






          share|improve this answer




















          • I don't think this quote illustrates what you want it to, since regardless of what goes over the network traffic it could still rewrite the files locally (which it has to do when there are changes).
            – Michael Homer
            27 mins ago










          • Yes, I'm sure (I checked with iotop). I know about the delta-transfer algoritm, the question was why it didn't work.
            – Eugene Yarmash
            8 mins ago










          • Because the files are really different? Check them with md5sum.
            – Ipor Sircer
            6 mins ago












          up vote
          0
          down vote










          up vote
          0
          down vote









          read the fine manual of rsync:



           It is famous for its
          delta-transfer algorithm, which reduces the amount of data sent over
          the network by sending only the differences between the source files
          and the existing files in the destination.


          I think you're getting read i/o, not write. Are you sure in rsync overwrite the files and not only scanning the content of them?






          share|improve this answer












          read the fine manual of rsync:



           It is famous for its
          delta-transfer algorithm, which reduces the amount of data sent over
          the network by sending only the differences between the source files
          and the existing files in the destination.


          I think you're getting read i/o, not write. Are you sure in rsync overwrite the files and not only scanning the content of them?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 55 mins ago









          Ipor Sircer

          9,8731921




          9,8731921











          • I don't think this quote illustrates what you want it to, since regardless of what goes over the network traffic it could still rewrite the files locally (which it has to do when there are changes).
            – Michael Homer
            27 mins ago










          • Yes, I'm sure (I checked with iotop). I know about the delta-transfer algoritm, the question was why it didn't work.
            – Eugene Yarmash
            8 mins ago










          • Because the files are really different? Check them with md5sum.
            – Ipor Sircer
            6 mins ago
















          • I don't think this quote illustrates what you want it to, since regardless of what goes over the network traffic it could still rewrite the files locally (which it has to do when there are changes).
            – Michael Homer
            27 mins ago










          • Yes, I'm sure (I checked with iotop). I know about the delta-transfer algoritm, the question was why it didn't work.
            – Eugene Yarmash
            8 mins ago










          • Because the files are really different? Check them with md5sum.
            – Ipor Sircer
            6 mins ago















          I don't think this quote illustrates what you want it to, since regardless of what goes over the network traffic it could still rewrite the files locally (which it has to do when there are changes).
          – Michael Homer
          27 mins ago




          I don't think this quote illustrates what you want it to, since regardless of what goes over the network traffic it could still rewrite the files locally (which it has to do when there are changes).
          – Michael Homer
          27 mins ago












          Yes, I'm sure (I checked with iotop). I know about the delta-transfer algoritm, the question was why it didn't work.
          – Eugene Yarmash
          8 mins ago




          Yes, I'm sure (I checked with iotop). I know about the delta-transfer algoritm, the question was why it didn't work.
          – Eugene Yarmash
          8 mins ago












          Because the files are really different? Check them with md5sum.
          – Ipor Sircer
          6 mins ago




          Because the files are really different? Check them with md5sum.
          – Ipor Sircer
          6 mins ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479649%2fdoes-rsync-completely-overwrite-files-with-different-timestamps%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay