Blog

SolusVM recovery from backup

Tags: recoverysolusvmVPS

Published on: July 1, 2014 by Sharafuddin M.A

SolusVM recovery from backup

Scenario:

You have lost the master VPS, but fortunately your admins did a good job by keeping solusVM backup in a remote place or FTP location. Whole of the WHMCS integration and the control panel settings everything is lost, but the VPSes inside the slaves are working.

You need to restore the SolusVM backup and setup a new Master. You decided not to go for a separate node and convert an existing SolusVM slave to master.

Solution :

Let us walk you through the process. Please note that this is an updated version of https://www.supportsages.com/blog/2010/10/how-to-migrate-the-solusvm-master-server/

Preparation :

Step 1.

Find out the OS version. Is it RHEL/CentOS 5 or 6. You can check this by executing the command ‘cat /etc/redhat-release’

Step 2.

Make sure that you don’t have any remains of other control panel installations, like HyperVM. If you have any HyperVM, make sure that you remove that.  View the post at https://www.supportsages.com/blog/2012/11/how-to-completely-uninstall-hypervm/ for a howto on that.

Step 3.

Confirm for yourself that either MySQL server is not installed or there is no databases inside the /var/lib/mysql . Because if it is there, you will lose the DB. If there is any, and you want the DB for later use, do take the backup.

Recovery Steps

1. Install SolusVM. Here choose the first option. i.e Master with No virtualization.

#wget http://soluslabs.com/installers/solusvm/install

#chmod 755 install

#./install

2. Check out the logs, /tmp/install.log and /tmp/preinstall.log for any errors. If everything goes well, you will be welcomed by a message.

It is advised that you change the default admin password on your first login.

Thankyou for choosing SolusVM.

Default admin login details for SolusVM as of this writing is vpsadmin / vpsadmin (u/p)

3. Next step would be to match the key with old SolusVM installation.

Since you already have the backup, with a name similar to backupssolusvm-backup-yyyy-mm-dd-hh-mm-ss.tar.gz , you will have the key of the old installation inside the backup in a file named, solusvm.conf

#tar tzf backupssolusvm-backup-*
database.gz
solusvm.conf

 

The format of the solusvm.conf is as follows:

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

eg: dfslo1k0y8so3:8vkflalj7d9a0jj:2r2bo303lw0plvj:localhost:DFFMLQXSE98EPLFLCPLJ4OFVMQEP6I1V9NMA07H7K41IPH3W

Of this, DFFMLQXSE98EPLFLCPLJ4OFVMQEP6I1V9NMA07H7K41IPH3W is the key.

 

Copy this key from the solusvm.conf which is inside the backup and replace it in the new master (server where slave is converted to master). File is at /usr/local/solusvm/includes/solusvm.conf

4. Restore the DB to the DB name you have at /usr/local/solusvm/includes/solusvm.conf. You can get the DB from the backup mentioned above. Extract the database.gz and you will get a file named, database. See below for the commands.


#tar xzf backupssolusvm-backup-yyyy-mm-dd-hh-mm-ss.tar.gz
#gunzip database.gz
#file database
database: ASCII English text, with very long lines
#mysql --user=USER --password=PASSWORD DATABASENAME &lt; database

5. Once you restore the DB, please note that you can only login to the server only using the old vpsadmin details. And all the other customer’s details and passwords will exactly be the old one. In case the old vpsadmin details didn’t work, your key would have been wrong. Recheck and compare the keys in solusvm.conf files (old and new)

6. If the IP changed, you now have to re-issue the SolusVM license.

For that you have to login to the SolusVM client area at https://www.soluslabs.com/clients/clientarea.php –> Licenses -> Click on the details icon –> Scroll down and click re-issue license. Once you have reissued the license, either Refresh License inside the SolusVM admin control panel at http://xx.xx.xx.xx:5353/admincp or simply re-login so that SolusVM can do its task by itself.

7. Make sure that in all your nodes/slaves, either remove  /usr/local/solusvm/data/allow.dat or update the file with the new IP (only in the case of an IP change)

Please note that node 1 is the master by SolusVM architecture.

8. Your settings should be all good to go. However if you are a bit unlucky / don’t like displaying same node under two different names, there are a few more steps to be followed as well. Since you converted a slave server to master node, chances are there you have both the slave and master listed inside the SolusVM. (Nodes -> List Nodes). You can’t delete localhost / SolusVM Master with node ID 1. However you cannot delete them from SolusVM Admin Control panel and an attempt to delete will tell you that “There are virtual servers in the node”.

A deletion from DB/backend is required in such case.


php /usr/local/solusvm/scripts/deletenode.php --level=force --comm=delete --id=[NODEID]

 

where NODEID is the old slave node ID.

Feel relaxed, that the node deletion won’t delete the VPSes inside the physical server. Actions are only in database. Ref: http://docs.solusvm.com/force_delete_node

9. Next step would be to import the VPSes manually. Hoping that you have added IPs in the SolusVM, go to     Configuration -> Settings -> Other -> Check the “Import Mode”

Please note that if  your old master server license was a “Slave Only” license, then you will have to upgrade the license to support / create VPSes in the master server.

Category : Howtos, Linux, VPS

Sharafuddin M.A

Sharafuddin M.A

Sharaf got immense interest and knowledge in implementing custom application and security solutions. He is highly competent in identifying and resolving security vulnerabilities, security breaches, hacked server recovery and server hardening. This soft spoken guy loves to watch movies and hanging out with friends.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items