I have just purchased a new VPS of the same harddisk capacity as my old VPS. Now I have 2 VPS with same capacity but different cores/ram. Both VPS offer a “rescue” system whereas the OS shutds down and then I can ssh to my VPS ip as root and be able to “see” the unmounted VPS disks.
I am now doing the cloning using dd. As follows:
0. Install Fedora on new VPS (destined to be wiped out soon) so that I have access to needed configuration files, e.g. network gateway, nameservers etc.
- set both VPS to “rescue” mode, meaning OS shuts down, disks unmounted, where I can access with ssh as root.
- ssh to the old VPS
- fdisk -l shows
/dev/sda1mounted at/bootand/dev/sda2mounted at/. - The clone command will
ddcurrent VPS disk/dev/sdaupload it viasshto the new VPS (whose content – i.e. a virgin Fedora OS – will be wiped out):dd if=/dev/sda bs=512M status=progress | ssh -C root@newIP 'dd of=/dev/sda bs=512M conv=fsync'. This command is now in progress for the next 3 hours as I initiated it for a test run. I can always wipe the new VPS and install virgin OS to reverse thedd’s effects above. - login’ing in to the new VPS I can see with
fdisk -lthat the previous disk configuration has changed and now has/dev/sda1and/dev/sda2as my old VPS. Which is a good sign.
My question is what files should I retain from the NEW VPS from when I did a Fedora OS installation, which I should copy back into it after the clone with dd has finished. Where do I get the network configuration for example? gateway, nameservers etc.
On the other hand, I assume fstab and the disk uuids should be good for the new system as well, because of the cloning/dd.
I have found this discussion: Migrating/reinstalling your system: What to transfer over?
but it deals with a new system on which the old system has been copied file-by-file, as opposed to the dd cloning I am doing.
thank you