Migrating non managed servers

How to migrate websites between non managed servers

When dealing with websites and hosting sooner or later you will need to move the web pages to another server for different reasons.  Maybe you will need to change the server provider due to lack of performance or because you have found a cheaper provider considering price or maybe you need and increase of CPU power or more memory or disk space.  Whatever reason you have the job is not an easy one.

Below you will find a ToDo list with the minimum tasks you should follow up to go ahead with your ‘challenge’ without loose your information, your customers or your health.

 

  • Create a full back-up of your original server (we will call it O server from now).
  • Migrate all the web pages to the destination server (this is D server).
  • Migrate all email accounts from O server for all domains.
  • Change DNS to point out our new public IP address

 

That is all.  Easy?  Well, looking into the list we can see the basics but we will need some additional efforts to do it right.  It is not so easy but not impossible, I even got it!

I would also strongly recommended you to take some time to protect your server from attacks.  To do that you can google a little and will find a lot of good recommendations or you can follow my suggestions, but be sure that could be improved!

  • Basic configuration against intrusions
  • Firewall
  • Monitoring tools & logs

 

Create a full backup of your origin server

Scenario

You have a little dedicated server and need to migrate all the content to your new and powerful server.  Both servers are running Linux OS (CentOS) and have Parrallel Plesk desktop installed.

First step is to create a full backup of your server, if you did not do it before (not a good thing if you have a server and do not know how to create one…).

Hands on

Log in into your server via Plesk desktop and go to ‘tools & setting’ from the left menu in your Plesk.

tools_settings_settings
Plesk backup tools & settings screen

Then select ‘backup settings’ and look into the different options:

Plesk backup setting screen
Plesk backup settings screen

Now you can define the maximum number of backup files to be stored in the server (for all your subscriptions, customers and accounts), the number of concurrent backup processes and a few more parameters.

I recommend you to do not mark ‘do not compress backup files’  in order to save hard disk space and ‘start the backup only if your server has the sufficient amount of free disk space’.

Once you have defined the basics settings you can move to the ‘backup manager’ screen.

tools_settings_manager

And look for the details inside…

backup

You can choose diferent options to save your backup file.  The first one is to store the file in the Plesk repository, but this is not a good idea because you can lose the backup file during the migration and then no option to recover de data. So if you choose that option be sure to move the backup file to a secured place or just choose the second option.  Then you will able to store the file in your own repository or in any other cloud service.  Use the one you like the most.

Now the backup file of your complete server in done and in a secured place, let’s move on…

 

 

Migrate all the web pages to the destination server

Login in the Plesk desktop in the D server, the one you want to migrate to.  Once you are inside go to ‘tools & setting’ from the left menu in your Plesk desktop and select “Migration & Transfer Manager” from the Tools & Resources menu.

migrating

If you cannot see that option you will need to install from Plesk app repository.  Go to ‘Extension’ from the left menu in your Plesk and press ‘Extension Catalog’ from the main menu in the top window.

add_migration_manager

From the repository click install in the item we are looking for: ‘Plesk Migrator’.

extension_catalog

Once your are inside Plesk Migrator tool you will see something llike the below image.

migrator_1

To start a new migration click on ‘start new migration’ icon and fulfill the information requested.  You will need to know the public IP of your O server and also you will need to enable the root user or use other user with administrative privileges.  You can let as default the rest of options or you can play qith your needs.  The differents option are self-explained.  In our case we will migrate the full content of the server.  Click on ‘next’ and the migration process will start.  It will take time depending of the content of your server.  Have a coffe or go to sleep a little…

migration_seetings

In the previous screen you can see the status of your migrations.  In the above image you can see that I have created two migrations, one with 15 domains and another one with only 1 domain.  When the process will be completed, you will have a complete copy of your O server but we need more steps to bring up the websites from our new server.

 

Migrate all email accounts from O server for all domains.

Now we have a copy of the webpages and DDBB.  We need to create all the email accounts in the new server.  Once we have created to email accounts in the new server is time to migrate mail boxes.  We will need to activate IMAP functionalities in the mail server if not activated by default yet.  The easiest way to do that is use application Imapcopy from www.ovh.net.  You can install directly on Linux from repositories but there is also an online application on the address:

https://ssl0.ovh.net/en/imapcopy/

The process is very easy and self explanatory.  You need to follow three single steps and wait for completion.  When the process finished you will receive an email notification with the details of the operation:

imapcopy

Change DNS to point out our new public IP address

Before to spread out your new IP addres in the DNS servers you will need to test the web site to be sure that no problems appeared during migration or if any configuration in the new server avoid to the web site to be showed correctly.  To do that you will need to point your browser to open your domain in the new server.  You can do that easy changing the hosts file.  Follow the recomendation in the post:

How to preview your website before spread your DNS

Now it is time to change your DNS to point to your new server.

Migration finished with success!!

Leave a Reply

Your email address will not be published. Required fields are marked *