yum install vzdump
If your master has virtual servers, you can back them up with vzdump. You need to obtain each container ID using the following:
[root@master ~] # vzlist -a CTID NPROC STATUS IP_ADDR HOSTNAME 107 - running 109.169.51.15 api. test .com 109 - stopped 109.169.51.13 apitest1.com 110 - running 1.1.1.1 apitest2.com |
Now that you know the CTID of each VPS you can back them up using vzdump:
vzdump --compress CTID |
Here's an example output:
[root@master ~] # vzdump --compress 107 |
From the output above you can see the backup (or dump) has been placed in the /vz/dump/ folder so all you need to do is upload it to the FTP server:
ncftpput -u USERNAME -p PASSWORD FTPServerIP /path/on/ftp/server/ /vz/dump/vzdump-107 .tgz |
Once the backup(s) have been downloaded you can restore each container:
vzdump --restore vzdump-107 .tgz 107 |
Once restored we now need to tell SolusVM that the container is there. We do this by switching on import mode
In your SolusVM admin control panel navigate to;
Configuration > Settings > Other > Tick “Import Mode”
Next follow the below
- Select Virtual Servers > Add Virtual Server
- Select OpenVZ
- Select the Node & Plan,then click Continue– The node you just placed the container backup on
- Enter the container ID of the virtual server you want to import (as shown under vzlist on the host node) in the Container ID field- We used 1001 in the restore process so we would enter 1001 here
- Fill in the rest of the fields
- Click the Create Virtual Server button
- Assign new IPs and change the main ip if required. Then reboot the server.
That should now be complete and you have duplicated an existing OpenVZ virtual server, migrated it to a new node and setup the container in SolusVM.