xfs_copy
should be used when doing an image of the source filesystem - ie: very similar to what dd
would do.
xfsdump
copies filesystem content rather than creating a true filesystem image. This measn xfsdump
walk the filesystem and, iterating on each object, copies each file/dir (including their attributes).
When using xfs_copy
vs xfsdump
? From xfs_copy
man page:
When moving filesystems from one disk to another, if the original
filesystem is significantly smaller than the new filesystem, and will
be made larger, we recommend that mkfs.xfs(8) and
xfsdump(8)/xfsrestore(8) be used instead of using xfs_copy and
xfs_growfs(8). The filesystem layout resulting from using
xfs_copy/xfs_growfs is almost always worse than the result of using
mkfs.xfs/xfsdump/xfsrestore but in the case of small filesystems, the
differences can have a significant performance impact.