[Discuss] rsync v. cp in data migration

Greg Rundlett (freephile) greg at freephile.com
Thu May 23 13:32:49 EDT 2013


Suppose you have to _migrate_ 4TB of data (all of /home/*) from one host to
a new SAN attached to a new host.  You know it's going to take time, and
your users work around the clock so the best approach would be to do the
migration in two steps:

1) copy all data as a way to get the "bulk" of the data migrated
2) disable write access to source and copy the remaining data

Assume that the /home directory on the "remote" source host is mounted via
NFS to the target host (so there is a local path to /source).

Would  cp
  cp -au /source/* /target
be preferable to rsync?
  rsync -vazn --checksum --progress --stats /source/ dest/

This conversation
http://unix.stackexchange.com/questions/44384/cp-or-rsync-is-cp-really-worth-it
doesn't seem to offer clear consensus; or if it does, it's that cp can be
used to make a phase one copy, and then (shut off write access to source)
rsync can be used to do the final copy.

Greg Rundlett



More information about the Discuss mailing list