Moving Fedora system to new disk

Chris Adams linux at cmadams.net
Wed May 28 18:08:30 UTC 2014


Once upon a time, Timothy Murphy <gayleard at eircom.net> said:
> I'm planning on saying "rsync -auvz" (which is my usual recipe).
> If anyone can suggest better options I shall be glad to hear them.

For copying the OS, you will also want -HAX to correctly copy
hard-linked files, access-control lists, and extended attributes.  For
disk-to-disk copies, drop -z (don't need to compress).  -u shouldn't be
needed (since you want an identical system, something newer on the
target shouldn't happen, and should probably be replaced if found).  If
the target has possibly been altered (or files have been deleted from
the source), add --delete.

I like adding -P (for --partial --progress); it gives more info during
sync and won't remove any partially-copied files (not usually an issue
for disk-to-disk, but useful for network transfers).

So, "rsync -aHAXvP --delete" would be my recommendation.

Also, unless you've disabled SELinux, you may need to relabel on the
first boot from the copy (not sure if rsync -X will set that correctly
or not; haven't checked in a while).
-- 
Chris Adams <linux at cmadams.net>


More information about the users mailing list