How to Migrate the SolusVM master server

How to Migrate the SolusVM master server

In this tutorial I will show you, how to migrate the SolusVM master server.

1. Preparing the New Master

Install a new master server as explained in the Install Guide.

2. Backing up the Original Database

You can backup your original SolusVM master database by entering the admin area and selecting System Tools > Database and clicking Send to Email or by downloading it directly.

3. Replacing the Encryption Key

Parts of your database are encoded using a unique encryption key stored in /usr/local/solusvm/includes/solusvm.conf. You need to make a copy of the encryption key on the original master and replace it on the new master.

The format of the solusvm.conf is as follows:

example: <DATABASENAME>:<USER>:<PASSWORD>:<HOST>:<the key is the last entry>

If you miss this step, non of your passwords or slave connections will work.

4. Restoring the Database

Upload the database backup to the new master server.

You can get the new database details from /usr/local/solusvm/includes/solusvm.conf, they are seperated with  ” :”.

example: <DATABASENAME>:<USER>:<PASSWORD>:<HOST>:<the key is the last entry>

Run this code in SSH on the new master to restore the database:

/usr/bin/mysql --user=USER --password=PASSWORD DATABASENAME < database.sql

If you change the IP of the master, you might need to reissue the license in solusvm.

5. Slave Configuration

Each slave in your cluster needs to know the new masters ip address (only if the masters ip is changed).

On each slave add the ip of your master to /usr/local/solusvm/data/allow.dat OR delete /usr/local/solusvm/data/allow.dat so it can be re-written.

6. OS Templates

Don’t forget to FTP, RSYNC etc. your OS templates to the new master.

Still confused.. Don’y worry, I’ll explain the issue clearly now.

You should upload the database in the root. After downloaded the database, it will be like the file “yhnypaejla4kop2014-01-01-04-36-46.gz”

After that you must extract the file “yhnypaejla4kop2014-01-01-04-36-46.gz”. Once done move the file yhnypaejla4kop2014-01-01-04-36-46 to database.sql

Once done, you should run the command:

/usr/bin/mysql –user=USER –password=PASSWORD DATABASENAME < database.sql

For ex;

OLD Master:
[root@srv2400 ~]# cat /usr/local/solusvm/includes/solusvm.conf

Copy the Encryption key VR3Y9Y9QTTP29Y38B0DQV941JJWVBY7CBMKUP89TNRSEX0OKG to the new Master now.

New Master:
[root@Ozdev ~]#  cat /usr/local/solusvm/includes/solusvm.conf

Once done move the extracted database file to database.sql, then do the final step.

[root@Ozdev ~]# mv 2nz6bs8gkboxb3y2015-09-09-17-46-25 database.sql
[root@Ozdev ~]# /usr/bin/mysql –user=r6ow3wyqhgi7xla –password=j5od5n0xhafkmz1 ujnbq9qzoysiuc1 < database.sql
[root@Ozdev ~]#

So that the database of the OLD MASTER will get updated to the NEW MASTER and the VPS will imported to the NEW MASTER. Then only you can able to control all the VPS from the NEW MASTER. Hope you can understand it now.

Was this Tutorial helpful? Help others share on Facebook, Twitter, and Google Plus!

Enjoyed this video?
How to Migrate the SolusVM master server
"No Thanks. Please Close This Box!"