how to get the status in dry run on rsync command











up vote
1
down vote

favorite












Use case - Compare all the files and directories on the mounts ( /apps , /logs , etc ) and calculate which one is the latest and size differences.



I am trying with rsync command , but with the limitation I am not achieving exactly what I need.



Under /tmp/test_ram I created two directories as dir1 and dir2. I have created two files under dir1 as shown below .



drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir2
drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir1

cd dir1 ; ls -ltr
total 196
-rw-r--r-- 1 chada users 188510 Nov 21 12:03 file_man_rsync
-rw-r--r-- 1 chada users 6854 Nov 21 12:04 file_man_diff


With DryRun –



I see nothing is happening which is expected, but in the o/p size is showing as zero. Which is not I was expecting, I want to see a size in diff of files



rsync -n -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


sending incremental file list
2018/11/21 12:04:55 tmp/test_ram/dir1/. 0
2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_diff 0
2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_rsync 0

sent 161 bytes received 25 bytes 372.00 bytes/sec
total size is 195,364 speedup is 1,050.34 (DRY RUN)


the actual run :



I see the file size is showing up, which is what expected. But I cannot take chance in copying without checking. Yes I do have backup dir, but still it need too much of analysis .



rsync -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram/dir3 /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


2018/11/21 12:05:52 tmp/test_ram/dir1/. 0
file_man_diff
6,854 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3)
2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_diff 2.48K
file_man_rsync
188,510 100% 16.34MB/s 0:00:00 (xfr#2, to-chk=0/3)
2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_rsync 56.28K

sent 58,915 bytes received 57 bytes 117,944.00 bytes/sec
total size is 195,364 speedup is 3.31


This is an example I took to depict . But my comparision would be between multiple servers.



The mount points can be same , but the files are directories is what I needed to compare.










share|improve this question









New contributor




Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    1
    down vote

    favorite












    Use case - Compare all the files and directories on the mounts ( /apps , /logs , etc ) and calculate which one is the latest and size differences.



    I am trying with rsync command , but with the limitation I am not achieving exactly what I need.



    Under /tmp/test_ram I created two directories as dir1 and dir2. I have created two files under dir1 as shown below .



    drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir2
    drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir1

    cd dir1 ; ls -ltr
    total 196
    -rw-r--r-- 1 chada users 188510 Nov 21 12:03 file_man_rsync
    -rw-r--r-- 1 chada users 6854 Nov 21 12:04 file_man_diff


    With DryRun –



    I see nothing is happening which is expected, but in the o/p size is showing as zero. Which is not I was expecting, I want to see a size in diff of files



    rsync -n -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


    sending incremental file list
    2018/11/21 12:04:55 tmp/test_ram/dir1/. 0
    2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_diff 0
    2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_rsync 0

    sent 161 bytes received 25 bytes 372.00 bytes/sec
    total size is 195,364 speedup is 1,050.34 (DRY RUN)


    the actual run :



    I see the file size is showing up, which is what expected. But I cannot take chance in copying without checking. Yes I do have backup dir, but still it need too much of analysis .



    rsync -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram/dir3 /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


    2018/11/21 12:05:52 tmp/test_ram/dir1/. 0
    file_man_diff
    6,854 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3)
    2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_diff 2.48K
    file_man_rsync
    188,510 100% 16.34MB/s 0:00:00 (xfr#2, to-chk=0/3)
    2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_rsync 56.28K

    sent 58,915 bytes received 57 bytes 117,944.00 bytes/sec
    total size is 195,364 speedup is 3.31


    This is an example I took to depict . But my comparision would be between multiple servers.



    The mount points can be same , but the files are directories is what I needed to compare.










    share|improve this question









    New contributor




    Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Use case - Compare all the files and directories on the mounts ( /apps , /logs , etc ) and calculate which one is the latest and size differences.



      I am trying with rsync command , but with the limitation I am not achieving exactly what I need.



      Under /tmp/test_ram I created two directories as dir1 and dir2. I have created two files under dir1 as shown below .



      drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir2
      drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir1

      cd dir1 ; ls -ltr
      total 196
      -rw-r--r-- 1 chada users 188510 Nov 21 12:03 file_man_rsync
      -rw-r--r-- 1 chada users 6854 Nov 21 12:04 file_man_diff


      With DryRun –



      I see nothing is happening which is expected, but in the o/p size is showing as zero. Which is not I was expecting, I want to see a size in diff of files



      rsync -n -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


      sending incremental file list
      2018/11/21 12:04:55 tmp/test_ram/dir1/. 0
      2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_diff 0
      2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_rsync 0

      sent 161 bytes received 25 bytes 372.00 bytes/sec
      total size is 195,364 speedup is 1,050.34 (DRY RUN)


      the actual run :



      I see the file size is showing up, which is what expected. But I cannot take chance in copying without checking. Yes I do have backup dir, but still it need too much of analysis .



      rsync -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram/dir3 /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


      2018/11/21 12:05:52 tmp/test_ram/dir1/. 0
      file_man_diff
      6,854 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3)
      2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_diff 2.48K
      file_man_rsync
      188,510 100% 16.34MB/s 0:00:00 (xfr#2, to-chk=0/3)
      2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_rsync 56.28K

      sent 58,915 bytes received 57 bytes 117,944.00 bytes/sec
      total size is 195,364 speedup is 3.31


      This is an example I took to depict . But my comparision would be between multiple servers.



      The mount points can be same , but the files are directories is what I needed to compare.










      share|improve this question









      New contributor




      Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Use case - Compare all the files and directories on the mounts ( /apps , /logs , etc ) and calculate which one is the latest and size differences.



      I am trying with rsync command , but with the limitation I am not achieving exactly what I need.



      Under /tmp/test_ram I created two directories as dir1 and dir2. I have created two files under dir1 as shown below .



      drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir2
      drwxr-xr-x 2 chada users 4096 Nov 21 12:03 dir1

      cd dir1 ; ls -ltr
      total 196
      -rw-r--r-- 1 chada users 188510 Nov 21 12:03 file_man_rsync
      -rw-r--r-- 1 chada users 6854 Nov 21 12:04 file_man_diff


      With DryRun –



      I see nothing is happening which is expected, but in the o/p size is showing as zero. Which is not I was expecting, I want to see a size in diff of files



      rsync -n -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


      sending incremental file list
      2018/11/21 12:04:55 tmp/test_ram/dir1/. 0
      2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_diff 0
      2018/11/21 12:04:55 tmp/test_ram/dir1/file_man_rsync 0

      sent 161 bytes received 25 bytes 372.00 bytes/sec
      total size is 195,364 speedup is 1,050.34 (DRY RUN)


      the actual run :



      I see the file size is showing up, which is what expected. But I cannot take chance in copying without checking. Yes I do have backup dir, but still it need too much of analysis .



      rsync -avrczP --out-format="%t %f %''b" --backup --backup-dir=/tmp/test_ram/dir3 /tmp/test_ram/dir1/ /tmp/test_ram/dir2/


      2018/11/21 12:05:52 tmp/test_ram/dir1/. 0
      file_man_diff
      6,854 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3)
      2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_diff 2.48K
      file_man_rsync
      188,510 100% 16.34MB/s 0:00:00 (xfr#2, to-chk=0/3)
      2018/11/21 12:05:52 tmp/test_ram/dir1/file_man_rsync 56.28K

      sent 58,915 bytes received 57 bytes 117,944.00 bytes/sec
      total size is 195,364 speedup is 3.31


      This is an example I took to depict . But my comparision would be between multiple servers.



      The mount points can be same , but the files are directories is what I needed to compare.







      rsync






      share|improve this question









      New contributor




      Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Nov 23 at 20:38









      Rui F Ribeiro

      38.2k1475125




      38.2k1475125






      New contributor




      Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 23 at 19:23









      Vajra

      61




      61




      New contributor




      Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Vajra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          active

          oldest

          votes











          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
          });


          }
          });






          Vajra is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483752%2fhow-to-get-the-status-in-dry-run-on-rsync-command%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Vajra is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          Vajra is a new contributor. Be nice, and check out our Code of Conduct.













          Vajra is a new contributor. Be nice, and check out our Code of Conduct.












          Vajra is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483752%2fhow-to-get-the-status-in-dry-run-on-rsync-command%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

          サソリ

          広島県道265号伴広島線

          Accessing regular linux commands in Huawei's Dopra Linux