Resume an interrupted file copy #

For those times when you've copied 200 of 210GB and then: the network connection goes down, someone inadvertently unplugs your USB drive, or Totus Copy crashes (as I just experienced), rsync can save you from having to start over from square one:

$ rsync --ignore-errors --archive --recursive --compress --partial --progress --ignore-existing --append /source/ /target/

Leopard and Snow Leopard still come packaged with the woefully out of date rsync 2.6.9, which does not preserve metadata or modification times correctly, even when using the -E and -t options. Mike Bombich explains how to download, compile, and install rsync 3.0.6, which does not suffer from these issues.

UPDATE: Added the ill-explained "--ignore-errors" option above. While the man page says its purpose is to "delete even if there are I/O errors", Mark Carroll points out that it would be more accurate to say something like "Go ahead even when there are IO errors, instead of regarding them as being fatal".

/nix | Nov 13, 2009


Subscribe or visit the archives.