What is the most reliable way to send files to another Mac over wifi?

Discussion in 'macOS' started by truth1ness, Mar 20, 2015.

  1. truth1ness macrumors regular

    Joined:
    May 8, 2011
    #1
    I want to send a bunch of files over wifi but I'm not sure if OSX does any kind of error checking/failure notification when simply dragging the files to a remote network drive. I've sent big files that were cut off and there was no error warning. What's the best (but still easy) way to do this and ensure the files' integrity?

    ps keep in mind it's usually a few folders worth of files. Going through each file with a checksum application and manually comparing is too tedious as I need to do this fairly regularly.
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    1. Compress entire folder of files on source Mac.
    2. Calculate checksum on resulting zip file.
    3. Copy zip file to target Mac.
    4. Calculate checksum on received zip file, from target Mac.
    5. Decompress zip file.

    There are other approaches. This is a fairly easy one.
     
  3. truth1ness thread starter macrumors regular

    Joined:
    May 8, 2011
    #3
    Nice, thanks. Would simply putting the files into a DMG, ISO or some kind of package file accomplish the same thing without having to wait for it all to get compressed?
     
  4. dyt1983, Mar 20, 2015
    Last edited: Jun 2, 2015

    dyt1983 macrumors 65816

    Joined:
    May 6, 2014
    Location:
    USA USA USA
    #4
    edit: To remove personally identifying information not relevant to the thread.
     
  5. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #5
    Those would work, but you should test whether they're faster than zipping. It may be that disk I/O is the slowest part, copying data to an uncompressed DMG will write the same amount of data as the original files. This could take longer than compression, which writes less data by nature.

    I also second what dyt1983 wrote about transferring large files over an unreliable connection.

    If you can't directly address the connection's reliability, consider a sync program. Look for one in the Mac App store. I have no recommendation, but there should be plenty of candidates.

    Finally, consider whether the problem may lie with your "network drive". You gave no info about it, but if it's causing the problem, there's not much the source Mac can do to remedy that. At best, it can detect failures and resend, but ultimately the target needs a minimum level of reliability.
     
  6. truth1ness thread starter macrumors regular

    Joined:
    May 8, 2011
    #6
    Cool, thanks for the help guys.

    I'm simply transferring to another mac's hard drive. Overall reliability of file transfers has been good, I've only had an issue once or twice where I checked the transferred file and a little chunk was missing and OSX hadn't thrown an error. This was a few OS's ago so maybe error checking has been added but until I'm sure I just want an extra layer of verification as this incident has been on my mind ever since. I would have lost a lot of data if I deleted the original copy thinking that OSX would have thrown an error if something went wrong.

    So the DMG route (I'm using a sparseimage b/c of its dynamic sizing) is quite a bit faster than Mac's built in Zip. For my 35gb set of files it's 8 minutes vs 30 minutes (plus zip extraction time on the other side you don't have with a dmg).

    I think all DMG's include a checksum. If you do a google search for "dmg checksum" you'll see a lot of help threads asking about an "Invalid Checksum" error when trying to open a downloaded DMG, so in theory a DMG should have the same integrity as a Zip and not need an external checksum, right?
     
  7. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    I wasn't sure that every DMG has a checksum, and suspected they didn't, so I had to look it up.

    The shell command 'hdiutil' is the command-line interface to the disk-image functionality. Its man page is here:
    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/hdiutil.1.html

    On that man page is this:
    verify image [options]
    compute the checksum of a "read-only" or "compressed" image and verify it against the value
    stored in the image. Read/write images don't contain checksums and thus can't be verified.
    verify accepts the common options -encryption, -stdinpass, -srcimagekey, -puppetstrings, and
    -plist.
    (Red hilite added.)

    Based on this, I don't think a read/write DMG has a checksum. You could test this by running the 'hdiutil' command on the target Mac. If you need an exact command-line, just ask.

    The reason you see "Checksum errors" on downloaded DMGs is that they're read-only or compressed.

    You could produce a checksum by creating the DMG as read-only or compressed, but I suspect that's going to take about the same amount of time as making a zip file. You won't need to unzip on the target Mac, just mount the DMG (which verifies its checksum), and copy the files off the DMG.

    The 'hdiutil' command also has a 'checksum' command, which can be performed on any DMG type. You could setup an Automator workflow to do this, show it to you, and then you run the same workflow on the target Mac and manually confirm.

    If I were doing this rigmarole more than once a week, I'd definitely look into a sync app that handles it all for me. Even if it's only once a week, I'd probably get sick of it in a couple months and again look for a reliable sync app.
     

Share This Page