Rsync copying same files everytime

Discussion in 'Mac Basics and Help' started by carefree, Nov 20, 2016.

  1. carefree macrumors newbie

    Joined:
    Oct 6, 2015
    #1
    Hi all,

    Having a strange issue with rsync copying the same files every time to my nas.

    When i rsync 2 folders on my mac it appears to work fine. Here is a copy of 2 folders on my mac, test1 and test2. The first copy is run

    rsync -av /Users/liam/Desktop/test1 /Users/liam/Desktop/test2

    building file list ... done
    test1/
    test1/.DS_Store
    test1/test_files/
    test1/test_files/.DS_Store
    test1/test_files/jquery-3.1.0.min.js
    test1/test_files/nav.html
    test1/test_files/style.css
    test1/test_files/toggle-nav.css
    test1/test_files/toggle-nav.html
    test1/test_files/toggle-nav.js
    test1/test_files/template/
    test1/test_files/template/.DS_Store
    test1/test_files/template/eosMenu.css
    test1/test_files/template/template.html
    test1/test_files/template/toggle-nav.css
    test1/test_files/template/css/
    test1/test_files/template/css/jquery.bxslider.css
    test1/test_files/template/img/
    test1/test_files/template/js/
    test1/test_files/template/js/.DS_Store
    test1/test_files/template/js/eosMenu.js
    test1/test_files/template/js/jquery-3.1.0.min.js
    test1/test_files/template/js/jquery.bxslider.min.js
    test1/test_files/template/js/toggle-nav.js

    sent 240196 bytes received 452 bytes 481296.00 bytes/sec
    total size is 238688 speedup is 0.99

    All files copied over just fine, when i run the test again nothing gets copied as per the below which is what i am looking to happen.

    rsync -av /Users/liam/Desktop/test1 /Users/liam/Desktop/test2
    building file list ... done

    sent 632 bytes received 20 bytes 1304.00 bytes/sec
    total size is 238688 speedup is 366.09

    When i run the same test copying the same test1 folder from my mac to the test2 folder now located on my nas it seems to show that its copying the directories every time after the initial first run. Here is the original copy to the nas copying everything for the first time.

    building file list ... done
    test1/
    test1/.DS_Store
    test1/test_files/
    test1/test_files/.DS_Store
    test1/test_files/jquery-3.1.0.min.js
    test1/test_files/nav.html
    test1/test_files/style.css
    test1/test_files/toggle-nav.css
    test1/test_files/toggle-nav.html
    test1/test_files/toggle-nav.js
    test1/test_files/template/
    test1/test_files/template/.DS_Store
    test1/test_files/template/eosMenu.css
    test1/test_files/template/template.html
    test1/test_files/template/toggle-nav.css
    test1/test_files/template/css/
    test1/test_files/template/css/jquery.bxslider.css
    test1/test_files/template/img/
    test1/test_files/template/js/
    test1/test_files/template/js/.DS_Store
    test1/test_files/template/js/eosMenu.js
    test1/test_files/template/js/jquery-3.1.0.min.js
    test1/test_files/template/js/jquery.bxslider.min.js
    test1/test_files/template/js/toggle-nav.js

    sent 240196 bytes received 452 bytes 481296.00 bytes/sec
    total size is 238688 speedup is 0.99

    Then the second copy showing the directories below that didnt show when copying the same two folders on just my mac and not over the network.

    -av /Users/liam/Desktop/test1 /Volumes/Websites
    building file list ... done
    test1/
    test1/test_files/
    test1/test_files/template/
    test1/test_files/template/css/
    test1/test_files/template/img/
    test1/test_files/template/js/

    sent 776 bytes received 164 bytes 1880.00 bytes/sec

    total size is 238688 speedup is 253.92

    Im not sure if its copying everything in the above directories on the second run or if its just displaying the directories for verbose reasons.

    Hope someone might be able to shed some light on this for me

    Thanks all
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    Add the -i option (a.k.a. --itemize-changes) so it tells you about attribute changes. You might also add more v's.

    Knowing nothing about your NAS or how it's connected (SMB, AFP, etc.), my first guess is that some attribute (owner, group, permissions, or a date) differs between the original and NAS-resident copy.

    See the man page for rsync for more info.
     

Share This Page