Using SolusVM to virtualize a VPS host is currently a common method. SolusVM is generally divided into master and controlled, that is, one SolusVM manages multiple server nodes. If there are many servers, SolusVM can easily migrate the VPS host between different nodes. If you can write API, you can integrate it into the client.

SolusVM can also easily upgrade and downgrade the hard disk, CPU, memory and other configurations of the created VPS host. After testing by wzfou.com, it was found that SolusVM can directly upgrade the memory, CPU and other configurations. You can see the effect after restarting the VPS host. , but expanding the hard drive is a bit troublesome, and the user needs to manually mount it.

This article will share the SolusVM KVM migration method (friends who manage multiple computer rooms may use it), as well as the VPS host automatic backup and recovery tutorial. Regarding VPS host backup and recovery, it is not only applicable to KVM VPS, but also other VPS hosts, such as OpenVZ and Xen.

SolusVM KVM VPS host migration method-SolusVM KVM backup and recovery tutorial

For individuals, if you want to move your website quickly, you can use this command: Rsync, SCP, Tar - Quickly solve VPS remote website moving and data synchronization. More about SolusVM operation methods and VPS host evaluation, See:

  1. Virmach low-price VPS host performance and speed review-$1/month KVM and OpenVZ VPS
  2. Graphical tutorial on using IPMI to install an operating system on an independent server - using iKVM, hard disk partitioning and ISO mounting
  3. SolusVM installation graphic tutorial and method of activating KVM VPS host-SolusVM master and controlled installation process

1. SolusVM KVM manual migration

website:

  1. Documentation: https://documentation.solusvm.com/display/DOCS/KVM+Manual+Migrations

Package and backup the original KVM VPS. Find the ID and path of the LV you want to back up, and use the following command:

[root@herculis ~]# lvdisplay

 --- Logical volume ---
  LV Name                /dev/vps/kvm101_img
  VG Name                vps
  LV UUID                pFtowh-vnxa-DXeE-KqqZ-N1h1-IQ2z-4VFSad
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                10.00 GB
  Current LE             160
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:52

As shown below:

Shut down the original KVM VPS host. You can also shut down manually:

virsh shutdown kvm101

Create a new KVM VPS backup:

dd if=/dev/vps/kvm101_img | gzip | dd of=/home/kvm101_backup.gz bs=4096

Copied to a new standalone server. Create the LV on the new server in advance. It must be the same size as the original KVM VPS:

lvcreate -n kvm101_img --size 10G /dev/vps

Copy the backup files to the new server:

scp -C /home/kvm101_backup.gz root@remote.wzfou.com:/home/

As shown below:

Restore KVM VPS. Directly use the following command to restore the file just copied to the created LV.

dd if=/home/kvm101_backup.gz | gzip -d | dd of=/dev/vps/kvm101_img bs=4096

As shown below:

SolusMV Master console updates and starts new KVM VPS. On your SolusVM Master operate :

/scripts/vm-migrate  

Example (that is, the node used to enable Solusvm's original KVM VPS):

/scripts/vm-migrate 150 4

<VSERVERID> Please fill in the VM ID in the SolusVM VM list, which is the ID of your original KVM VPS.
<NEWNODEID>Please fill in the node id in the SolusVM node list.

Start the VPS host for the configuration to take effect. (Must restart in SolusVM) Go to the original server and delete the LV of the KVM VPS that has been migrated.

lvremove /dev/vps/kvm101_img

If you want to view the progress of the DD process, use the following command:

ps ux | awk '/dd/ && !/awk/ {print $2}' | xargs kill -s USR1 $1

2. SolusVM VPS host automatic migration

Manual migration is suitable for situations where automatic migration fails. SolusVM's automatic migration of VPS hosts is still very convenient. Enter the VPS host management interface of SolusVM and click on the specific VPS host you want to migrate.

Select I want to migrate. Here I use the cloud host to migrate from the PZ node to the C3 node as a demonstration (PS: If users of the Qyfou host want to migrate the computer room, they can send a work order or contact me, and I will migrate it for free).

After clicking OK, you can see the progress of the automatic migration of the SolusVM VPS host. (Click to enlarge)

After the migration is completed, you will be prompted whether to delete the original data and restart the new VPS.

3. Update IP after moving SolusVM VPS

The IP addresses of different computer rooms may be different. If the original IP cannot be kept unchanged after the SolusVM VPS is moved, then we need to update the IP for the KVM VPS in SolusVM. First add a new IP to the VPS.

Then add the new IP to the VPS in MainIP.

Finally, remember to click Reset Network on SolusVM, so that the new IP will be added successfully.

4. SolusVM VPS backup and recovery

  1. Documentation: https://documentation.solusvm.com/display/DOCS/Automated+Backups

SolusVM has an automatic FTP backup function, which can regularly package the VPS host to the FTP server. When it is time to restore, it can be restored directly from the FTP server, which is equivalent to a snapshot function. The first step is to configure the FTP server on the Node node.

Configuring FTP backup allows you to set the backup frequency, backup compression format, etc.

After backup, you can see the compressed and transferred files on your FTP server.

If you want to restore, use the following command and enter the vserver ID displayed on SolusVM that you want to restore:

/scripts/ftp-restore

When if the VPS has been deleted from SolusVM, you need to use the following commands to create and restore it:

/usr/sbin/vzdump --restore /path/to/backup/file NEW-CONTAINER-ID

5. Summary

SolusVM VPS backup and recovery is simple, and moving with SolusVM is also quite convenient. If you move SolusVM KVM VPS manually, remember to restart the VPS and configure the new IP and network.

SolusVM KVM VPS needs to perform a large number of disk read and write operations during backup and recovery. If there are too many backups and recoveries, it will easily put pressure on the server, so try to use SSD hard drives when purchasing servers.

Leave a Reply