I'm trying to duplicate the entire environment on one machine to another. Will simply copying all files from the source machine to the destination one work? My main concern is that typically, when copying a file from one machine to another, the permissions/ownership aren't copied correctly, so I'm thinking that might cause some issues. But I'm thinking if I copy the entire file system, then all the user configuration should be copied over as well and it might work?
On original machine:
dd if=/dev/sda of=/some/device/image.img conv=noerror
On target machine:
dd if=/some/device/image.img of=/dev/sda conv=noerror
The OS is Centos 7 and it's a desktop workstation (dev box). Both boxes are using UEFI. Source drive is 59 GB and dest is 143GB so there's plenty of space.
cat
instead ofdd
and it'll not only be no slower, it may actually be faster. – Chris Davies Sep 19 '19 at 23:22cat
. See Is there a way to determine the optimal value for the bs parameter to dd for some timings. (But I did misspell SSD.) – Chris Davies Sep 20 '19 at 09:51dd
isn't a file-level copy, so your "Will simply copying all files from the source machine to the destination one work" isn't relevant. If you're considering a file-level copy please add the command (proposed or actual, it doesn't really matter) to your question. – Chris Davies Sep 20 '19 at 09:56