rsync: listing only changed files/attributes












1














I am trying to achieve the following:



In order to check whether I correctly rsynced all data from my old NAS to my new, I am executing:



rsync --rltD -hvinu /path/to/old/NAS/ /path/to/new/NAS


Now: -n is getting me a dry-run, -i a list of changes and -u should skip all files newer on the new NAS (which I need because there are already updates on the new NAS - people are working with it already).



The above command is giving me a listing that contains this for several directories:



.d..t


which acc. to man-page means that no transfer will happen, but that attributes (i.e. the time) will be updated in the target.



Checking the affected directory, I can see that the directory in the target is NEWER than the one in the source.



So I'd




  1. expect to not even see it in rsyncs output - since it should have been skipped,

  2. there should not ever be an update of that timestamp.
    -u should take care of that.


Any rsync pro here who can explain? What am I not getting here?



btw.: This is an rsync implementation on a Qnap NAS (source) and Synology NAS (target).



UPDATE 1:



So it seems that --update only applies to files, not directories.
rsync is doing what it is supposed to do: compare size and last-modified timestamp and updating the timestamp in the destination to the one in the source (which is older).



I have not found an option to apply --update to directories - there is however --omit-dir-times that will ignore timestamps on directories.
Applying that option, will also result in newer directories in the source to be ignored. So an added file in the source will be synced to destination, but the corresponding change in its parent directory's time will not be synced. I cannot imagine this to be a bug/flaw in rsync - I must be missing something here?










share|improve this question





























    1














    I am trying to achieve the following:



    In order to check whether I correctly rsynced all data from my old NAS to my new, I am executing:



    rsync --rltD -hvinu /path/to/old/NAS/ /path/to/new/NAS


    Now: -n is getting me a dry-run, -i a list of changes and -u should skip all files newer on the new NAS (which I need because there are already updates on the new NAS - people are working with it already).



    The above command is giving me a listing that contains this for several directories:



    .d..t


    which acc. to man-page means that no transfer will happen, but that attributes (i.e. the time) will be updated in the target.



    Checking the affected directory, I can see that the directory in the target is NEWER than the one in the source.



    So I'd




    1. expect to not even see it in rsyncs output - since it should have been skipped,

    2. there should not ever be an update of that timestamp.
      -u should take care of that.


    Any rsync pro here who can explain? What am I not getting here?



    btw.: This is an rsync implementation on a Qnap NAS (source) and Synology NAS (target).



    UPDATE 1:



    So it seems that --update only applies to files, not directories.
    rsync is doing what it is supposed to do: compare size and last-modified timestamp and updating the timestamp in the destination to the one in the source (which is older).



    I have not found an option to apply --update to directories - there is however --omit-dir-times that will ignore timestamps on directories.
    Applying that option, will also result in newer directories in the source to be ignored. So an added file in the source will be synced to destination, but the corresponding change in its parent directory's time will not be synced. I cannot imagine this to be a bug/flaw in rsync - I must be missing something here?










    share|improve this question



























      1












      1








      1







      I am trying to achieve the following:



      In order to check whether I correctly rsynced all data from my old NAS to my new, I am executing:



      rsync --rltD -hvinu /path/to/old/NAS/ /path/to/new/NAS


      Now: -n is getting me a dry-run, -i a list of changes and -u should skip all files newer on the new NAS (which I need because there are already updates on the new NAS - people are working with it already).



      The above command is giving me a listing that contains this for several directories:



      .d..t


      which acc. to man-page means that no transfer will happen, but that attributes (i.e. the time) will be updated in the target.



      Checking the affected directory, I can see that the directory in the target is NEWER than the one in the source.



      So I'd




      1. expect to not even see it in rsyncs output - since it should have been skipped,

      2. there should not ever be an update of that timestamp.
        -u should take care of that.


      Any rsync pro here who can explain? What am I not getting here?



      btw.: This is an rsync implementation on a Qnap NAS (source) and Synology NAS (target).



      UPDATE 1:



      So it seems that --update only applies to files, not directories.
      rsync is doing what it is supposed to do: compare size and last-modified timestamp and updating the timestamp in the destination to the one in the source (which is older).



      I have not found an option to apply --update to directories - there is however --omit-dir-times that will ignore timestamps on directories.
      Applying that option, will also result in newer directories in the source to be ignored. So an added file in the source will be synced to destination, but the corresponding change in its parent directory's time will not be synced. I cannot imagine this to be a bug/flaw in rsync - I must be missing something here?










      share|improve this question















      I am trying to achieve the following:



      In order to check whether I correctly rsynced all data from my old NAS to my new, I am executing:



      rsync --rltD -hvinu /path/to/old/NAS/ /path/to/new/NAS


      Now: -n is getting me a dry-run, -i a list of changes and -u should skip all files newer on the new NAS (which I need because there are already updates on the new NAS - people are working with it already).



      The above command is giving me a listing that contains this for several directories:



      .d..t


      which acc. to man-page means that no transfer will happen, but that attributes (i.e. the time) will be updated in the target.



      Checking the affected directory, I can see that the directory in the target is NEWER than the one in the source.



      So I'd




      1. expect to not even see it in rsyncs output - since it should have been skipped,

      2. there should not ever be an update of that timestamp.
        -u should take care of that.


      Any rsync pro here who can explain? What am I not getting here?



      btw.: This is an rsync implementation on a Qnap NAS (source) and Synology NAS (target).



      UPDATE 1:



      So it seems that --update only applies to files, not directories.
      rsync is doing what it is supposed to do: compare size and last-modified timestamp and updating the timestamp in the destination to the one in the source (which is older).



      I have not found an option to apply --update to directories - there is however --omit-dir-times that will ignore timestamps on directories.
      Applying that option, will also result in newer directories in the source to be ignored. So an added file in the source will be synced to destination, but the corresponding change in its parent directory's time will not be synced. I cannot imagine this to be a bug/flaw in rsync - I must be missing something here?







      linux rsync synology qnap






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 2 at 13:06

























      asked Nov 30 at 19:34









      quaylar

      1163




      1163



























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fsuperuser.com%2fquestions%2f1379812%2frsync-listing-only-changed-files-attributes%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1379812%2frsync-listing-only-changed-files-attributes%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Сан-Квентин

          8-я гвардейская общевойсковая армия

          Алькесар