Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th May 2014, 04:43
Unfaiir Unfaiir is offline
HowtoForge Supporter
 
Join Date: Jul 2012
Location: Orange County, CA, USA
Posts: 43
Thanks: 14
Thanked 3 Times in 2 Posts
Default ISPConfig 3 Migration Experience - CentOS 6.5

Introduction:
This is the tale of my ISPConfig 3 server migration between two CentOS 6.5 servers. I've done a lot of research and info gathering from various places and am combining them in one place, in an easy to reference format. I'm going to go over each of my steps in detail, but I've also created and included a migration script at the end under "Appendix A - ISPConfig 3 - Migration Script" which should help out anyone seeking to perform this rather tedious and mundane task of server transferring ISPConfig to a new server without messing anything up (at least nothing major anyway ).

This is mostly for my own satisfaction and personal reference, but I'm sure someone else will benefit too some day, which is a good thing I guess.

Protocol 1 - Install ISPConfig:

Below are the cliff notes of the new server setup:
  • Installed CentOS 6.5 on fresh server
  • Followed Perferct Server Guide to install ISPConfig 3 and related software
  • Created all clients through ISPConfig 3 Interface, with exactly the same client_id, username, company_name and contact_name as the old server
  • Installed as many of the extensions, plugins and additional applications that I could remember that I use from the old server (E.g. PHP extensions, Apache modules, etc...)

I did not have access to the ISPConfig control panel because my old server was having internet issues so I used mysql to grab the info about the clients that way. If you are ever in the same boat and can't access the web interface, you can use this to get the list of clients from mysql command line:

Code:
mysql -u root -pPASSWORD -e "SELECT client_id, username, company_name, contact_name FROM client;" dbispconfig;
Protocol 2 - Backup Old Server:
I started with backing up the most obvious things like the databases, web files, logs, mail and server config.

I don't know exactly which config files from /etc I need yet so I will just pick and choose what I need later.

I found various posts which talked about backing up users and groups and shadow files. My conclusion is that the best way to handle this is to just create the new users on the new server exactly as they are on the old server and then I don't need to bother with messing with users and groups and shadow files.

I'm tempted to backup the whole /var and /usr directories, but on second thought decided to spend some time determining the most relevant directories out of these. I didn't want to backup unnecessary things, and definitely not anything that may cause an issue if transferred.

After much research, I found that what gets backed up depends on what programs you installed since not all ISPConfig installations are even using the same programs. I just went through all my directories and for my particular installation, I ended up backing up the following directories:
  • /etc/cron.d
  • /etc/fail2ban
  • /etc/httpd
  • /etc/my.cnf
  • /etc/named
  • /etc/php.ini
  • /etc/phpMyAdmin
  • /etc/postfix
  • /etc/squirrelmail
  • /usr/lib/courier-imap
  • /usr/local/ispconfig/interface/lib
  • /usr/local/ispconfig/server/lib
  • /var/lib/phpMyAdmin
  • /var/lib/squirrelmail
  • /var/log
  • /var/vmail
  • /var/www
* Please comment or message if you see anything I missed *

Protocol 3 - Data Transfer:
My old server doesn't have a wireless card and for some reason the network card it did have wouldn't connect wired with a dynamic IP.

I tried to use a switch and hook up the two servers and I could access ISPConfig from the new server via web, but I couldn't get an SSH or FTP connection for some reason, so no way to get the files.

So finally I went and bought a USB stick, mounted it on the old server, moved my backup onto it, unmounted it, put it in the new server, and then mounted it there.

So to summarize, there are many ways to do it, but one way or another you need to move your backup files (2 in my case) between the two servers.

Protocol 4 - Import Old Server Data
In Progress! Coming Soon!

Appendix A - ISPConfig 3 - Migration Script:
I've created migration script to achieve the backup described in Protocol 2 - Backup Old Server. Its pretty simple, but it does all of the backup tasks I've described above and can be pretty easily configured to backup different directories or additional directories. Feel free to check it out and use it.

I will be adding the import functionality to it once I get Protocol 4 - Import Old Server Data updated on here.

https://github.com/unfaiir/ispc3-migration
__________________
We are not equal

Last edited by Unfaiir; 8th May 2014 at 09:34.
Reply With Quote
Sponsored Links
  #2  
Old 8th May 2014, 09:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,421
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
 
Default

When you move a ispconfig installation, then it is important to copy also the web* users and client* groups over from /etc/passwd, shadow, group and gshadow file. If you wont to that and let ispconfig create new users for the sites with the resync function instead, then the enw users might get different uid's and the migrated wwebsites might fail then due to permission errors.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incomplete Install - CentOS 6.5, MySQL 5.6.16, Apache 2.2.15, PHP 5.3.3 Ator Installation/Configuration 7 12th March 2014 21:19
New to ISPConfig 3. Centos Install Questions harrythehamster General 2 30th October 2012 17:59
SquirrelMail login not working glenneh Installation/Configuration 13 9th April 2011 20:01
Ftp problems timeout reny2000 General 6 23rd December 2009 11:09
Install ISPConfig on CentOS Server, in brief gfts Tips/Tricks/Mods 11 4th April 2006 08:29


All times are GMT +2. The time now is 02:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.