Need help with Copying Files using Terminal

Discussion in 'Mac Basics and Help' started by roachclip, Sep 2, 2015.

  1. roachclip macrumors newbie

    Joined:
    Sep 2, 2015
    #1
    I have two external hard drives I use to archive large media files such as .mov and .fcpx bundles. One drive is the primary while the other is an archive / backup.

    Right now I'm using Rsync to backup everything once a week but since I have 1.5 TB of data it takes a long time. I would like to know if there is a terminal command that will allow me to copy only new files or files that have been changed.

    Thanks,
     
  2. CoastalOR macrumors 68000

    CoastalOR

    Joined:
    Jan 19, 2015
    Location:
    Oregon, USA
    #2
    Sorry, I'm not a terminal guru, but I use ChronoSync. It can be set to only back up changed files.
     
  3. roachclip thread starter macrumors newbie

    Joined:
    Sep 2, 2015
  4. Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #4
    Hi,

    you can do this with Carbon Copy Cloner.
     
  5. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #5
    That is what is called an "incremental backup" and that is what rsync does by default. If you run it against the same source and target it should only copy new or modified files each time. Perhaps you have added a switch that is overriding the default behavior?
     
  6. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #6
    That's exactly what rsync is supposed to do. Copy over only the files that change. Are you sure that's not working? If you turn on logging with "-v", it will give you a "speedup" number at the end telling you how much time it saved by not copying some files. What exact commands are you executing? You should probably be using the "-a" flag to move the files to the external drive.

    So in other words:

    Code:
    rsync -av directory/ /Volumes/external/directory/
    Another possibility is that rsync is working quite right because of timestamp issues. By default, I believe rsync uses file timestamps to figure out what to to copy and what not to copy. Maybe something is going wrong and the date can't be set properly on the external drive. What filesystem is on the external drive? That might matter.
     
  7. ocabj macrumors 6502a

    ocabj

    Joined:
    Jul 2, 2009
    #7
    rsync's -c parameter will do skips based on checksum, not mod-time or size. This might be more reliable for you if you're having issues.

    Considering ChronoSync in all likelihood is just using rsync, you're probably going to have the same issues with ChronoSync.
     
  8. roachclip, Sep 2, 2015
    Last edited by a moderator: Sep 2, 2015

    roachclip thread starter macrumors newbie

    Joined:
    Sep 2, 2015
    #8
    Ah, that very well could be. Here's the code I use:
    sudo rsync -vaE --progress /Volumes/Studio/ /Volumes/Failover/

    Do one of those switches cause the override?
     
  9. roachclip thread starter macrumors newbie

    Joined:
    Sep 2, 2015
    #9
    Mac OS Extended (Journaled) is the format of the Source and Destination
     
  10. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #10
    I don't believe any of the switches would over ride the default incremental backup.
     
  11. roachclip thread starter macrumors newbie

    Joined:
    Sep 2, 2015
    #11
    Thanks.
     
  12. roachclip thread starter macrumors newbie

    Joined:
    Sep 2, 2015
    #12
    I eliminated the E switch (extended attribute) and it seemed to work, only copying over the new files I added today. After that the routine terminated.
     
  13. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #13
    Interesting... one would not think that switch would matter. Glad you figured it out. :)
     

Share This Page