rsync

Discussion in 'MacBook' started by chattahoochee, Nov 9, 2016.

  1. chattahoochee macrumors 6502

    Joined:
    Dec 30, 2012
    Location:
    Palmetto Florida
    #1
    I am going to transfer a large file from one remote hard drive to another. Is "rsync" the best process for this ?
     
  2. Floris macrumors 68020

    Floris

    Joined:
    Sep 7, 2007
    Location:
    Netherlands
  3. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #3
    Aside from ensuring exact copy the question was two remote drives unless both are on the same remote host then cp will not be an option at all. To the OP scp would work as well for one off coping between hosts.
     
  4. chattahoochee thread starter macrumors 6502

    Joined:
    Dec 30, 2012
    Location:
    Palmetto Florida
  5. Floris macrumors 68020

    Floris

    Joined:
    Sep 7, 2007
    Location:
    Netherlands
    #5
    "rsync is a utility that keeps copies of a file on two computer systems. It is commonly found on Unix-like systems and functions as both a file synchronization and file transfer program. The rsync algorithm is a type of delta encoding, and is used to minimize network usage."

    cp is a kernel command on *nix based systems, also used from the cli (command line interface) to copy files from one drive to another, or another location

    mv is a kernel command on *nix based systems, also used from the cli to move (copy to target and delete source) to another location, or drive.

    If you are not familiar with any of these apps/commands, or the command line interface, and you're just copying a file over for a backup reason, incidentally, and manually .. then just using finder will be enough, or normal cp to copy from target to source location.

    If you're setting up a more complex thing, such as a shell script to run daily to update an automated backup solution by appending to existing data - THEN rsync might be a better choice, as it stores the changes, and doesn't start from scratch.
     
  6. chattahoochee thread starter macrumors 6502

    Joined:
    Dec 30, 2012
    Location:
    Palmetto Florida
    #6
    Always before when I purchased a new remote HD I had both icons on my desktop, then i would drag the old HD onto the new one. This transfer took a long time. I'm just trying to find a quicker way.
     
  7. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #7
    Only way to speed that up is by upgrading the interface the transfers are on even then the interface of the connected drives have to support the new. Now there are possibilities of putting dual port USB3 dongle on older mac to have it work faster but that is pretty much the only option except firewire on older mac that would be faster than USB2.
     
  8. hardax macrumors regular

    Joined:
    Jan 16, 2008
    Location:
    New Hampshire
    #8
    I use the Rsync method all the time with great success. Its more a matter of data integrity and the ability to continue from where you left off if anything goes wrong as opposed to a speed benefit.

    http://apple.stackexchange.com/ques...ssive-data-from-one-external-drive-to-another
     
  9. Zazoh macrumors 6502a

    Zazoh

    Joined:
    Jan 4, 2009
    Location:
    Mico, Texas
    #9
    I use rsync to back up my computer to an external drive, checks to see what is not in sync, can remove files not on original if needed, and I can see the progress, run at home and office so I have dual back ups. Seems faster than drag and drop but give it a try.
     
  10. chattahoochee thread starter macrumors 6502

    Joined:
    Dec 30, 2012
    Location:
    Palmetto Florida
    #10
    Do you have a "Link" for rsync that you used ? When I go on line and ask for rsync I get a dozen pages.
     
  11. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #11
  12. chattahoochee thread starter macrumors 6502

    Joined:
    Dec 30, 2012
    Location:
    Palmetto Florida
    #12
    Thank you "Weaselboy" now all I have to do is make sense out of it !
     
  13. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #13
    https://rsyncosx.blogspot.no

    If your needs are simple (it sounds like they are), there are GUI utilities out there that you can use to setup rsync. I linked here to one that is fairly popular. It might be easier for you to just use a utility like this.
     
  14. hardax macrumors regular

    Joined:
    Jan 16, 2008
    Location:
    New Hampshire
    #14
    Use the link in my response above. It was very simple to follow.
     
  15. chattahoochee thread starter macrumors 6502

    Joined:
    Dec 30, 2012
    Location:
    Palmetto Florida
    #15
    i have tried to use rsync and have come up zilch ! 1st I download it as per instructions, then I get a format that does nothing, Note "Labels" below. Also should I place "Partition's in the remote HD I'm planning to save my files in ?
    I have absolutely ran aground on this rsync.
     

    Attached Files:

  16. Zazoh macrumors 6502a

    Zazoh

    Joined:
    Jan 4, 2009
    Location:
    Mico, Texas
    #16
  17. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #17
    A command like this in Terminal will do fine.

    Code:
    rsync -avP /path/to/file/to/sync username@192.168.0.100:directory/to/save/to/
    
    This syncs/copies the file sync to the username's directory/to/save/to/ in their home directory using ssh at the IP of 192.168.0.100. You need to turn ssh on in System Preferences -> Sharing -> Remote Login on the target machine.
     
  18. dotnet macrumors 6502a

    dotnet

    Joined:
    Apr 10, 2015
    Location:
    Sydney, Australia
    #18
    If remote hard drive means hard drive connected to a remote host then the options depend on whether both hard drives are connected to the same or to different remote hosts.

    If the former, it would be most efficient to log on to the remote host and copy the file locally.

    If the latter, you're bound by the methods at your disposal of connecting to the remote hosts.

    If both hosts run ftp servers you can use the ftp proxy command to transfer the file directly from one host to the other, from the comfort of your own machine.

    If the hosts run ssh servers (far more likely these days) you can either:
    - log on to one host with ssh and copy the file to the other using scp (in one command line), or
    - copy the file from one host to the other with scp (this is far less efficient, since the file gets copied from the first host to your machine, then from your machine to the second host)

    If both hosts support SMB file sharing you can simply mount the drives from both hosts and drag&drop the file from one to the other.

    Rsync doesn't really offer anything special here, it is useful for keeping a set of files in sync across hosts. Also for copying a number a files, because in case of a connection drop it can continue from where it left off.

    If the issue is the large file size and an unreliable link it may be beneficial to use split to break the file into small chunks, use rsync to transfer them (using as many incremental tries as are necessary) and combine them back together at the destination.
     
  19. MacUser2525 macrumors 68000

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #19
    The second is waste of time/additional steps, as you mention in the first line it will pickup exactly where it left off (with a -P in command line) and if the checksums do not match it will sync until it has exact duplicate on the other end.
     
  20. chattahoochee thread starter macrumors 6502

    Joined:
    Dec 30, 2012
    Location:
    Palmetto Florida
    #20

Share This Page