0

Yo, so I need to migrate server from one VPS to another with exact copy of a system with all users, database data and etc. I have image of source VPS but suddenly hosting doesn't provide ability to install that image to destination VPS and I don't know what do to with that.

I've tried this but I didn't understand how exactly I should do steps 3-5.

Lokilife
  • 1
  • 1
  • 1
    `suddenly hosting doesn't provide ability` - why is it "suddenly"? did they provide the ability recently? – Jaromanda X May 08 '23 at 10:33
  • @JaromandaX Previously, we used their servers in data center in which this function was supported, but as it turned out, not all of their data centers support it, and very fortunately, this function is not available in the location we need. – Lokilife May 08 '23 at 10:37

1 Answers1

0

As the image you have is presumably a block device, an image based restore may work.

Boot a rescue environment, or another instance that does not mount either disk.

Attach storage for both the new VM and the old one to the rescue instances. Block devices for both should appear under /dev/disk/by-*

Image old to new disk large blocks at a time. dd bs=1M Be careful in selecting the disks with the if and of parameters.

A general purpose OS distro is versatile, however differences in old and new hosts may cause the VM to not boot or not be on the network. Be prepared to troubleshoot these problems. If you don't have good tools to do so, boot rescue mode again, and look at log files.

Should the restored instance be functional, archive the image to long term storage as a backup.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34