0

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.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287

1 Answers1

1

As answered here here you can attach the drive of the second machine to your machine and simply do dd block level copy.

Please note the second HDD has to be at least the size of the first HDD. If its larger you may need to extend the filesystem after.