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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 5th November 2007, 06:12
wpwood3 wpwood3 is offline
Senior Member
Join Date: Oct 2007
Location: Atlanta, GA USA
Posts: 197
Thanks: 21
Thanked 31 Times in 21 Posts
Post Moving to new server - lessons learned

Following are some of my random observations, tips and lessons learned from my move to an ISPConfig "Perfect Setup" server.

I recently moved to a new dedicated server and thought I would try to capture some of the things that made my move as easy as possible. This was a pretty big deal for me because I had to take down an existing production server and move to a new one with minimal downtime. Time IS money!


1) Shop around for your hardware but don't buy on price alone. Don't just settle for a fast cheap box if your business depends on high availability and a BIG FAST pipe to the internet. Those NOC's with redundant everything cost more than a box in a basement. After you have settled on the hardware you want, don’t forget, price is usually negotiable.

2) Build a test server to experiment and finalize on the software you will use. It doesn't have to be a "real" server...just a computer that will run the OS and applications you will use. I had an old P4 sitting around the house that was looking for something to do. Most of the Linux distributions are free to download and try so why not do it. I must have loaded and wiped the OS off the drive 2 or 3 times before I settled on how I liked it. Once I got what I wanted I imaged the drive so I could easily start over in just a few minutes.

3) Document everything you do so you don't have to remember every miracle solution you came up with at 3am after drinking 4 pots of coffee. I created a “New Server” folder on my desktop PC with subfolders for each application I planned to install. In these folders I had shortcuts to relevant websites and text files explaining how to download, compile, install and configure each individual application.

4) Don’t put off anything until the last minute. Find out what you don’t know and get the answers before you need them. It’s easier to figure out the solution when you’re not under too much time pressure.


5) Setup your nameservers early so you can minimize the dns propagation delay. If you are using NS1.NAMESERVER.TLD and NS2.NAMESERVER.TLD for your old server then go to your domain registrar (Network Solutions, GoDaddy, etc) and create NS3 and NS4 nameservers pointing to your new server’s IP addresses. Don’t transfer your domain to NS3 & NS4 yet. All you want to do is create them for later.

6) The easiest way I have found to move data from the old server to the new server is by using a little utility called scp. Most all of the popular Linux distributions include it. It’s secure, fast and easy to use because it uses SSH.

For these examples assume the following:
Old server IP –
You old server username – joe
Folder on old server - /home/httpd/web/
Folder on new server - /var/www/web2/web

To move a single file from your old server to the new one. Login to your NEW server via SSH terminal and use this command:
scp -p -C joe@ /var/www/web2/web
-p preserve dates, times and file permissions
-C forces scp to use compression which speeds transfer

If you want to move an entire folder including subfolders then use the use the –r flag
scp -p –r -C joe@ /var/www/web2/web
-r recursive

7) If you have very large files to move then don’t use zip because it is limited to 2GB max. Use gzip instead. I had several very large MySQL databases to move and zip refused to compress them. Gzip is simple to use just type gzip filename and you get a compressed file (filename.gz)

To unzip just use the –d flag:
gzip –d filename.gz
8) MySQL databases can be dumped and reloaded easily for transfer. (assuming your MySQL username is joe and your database name is db_name)

To dump your database into a file :
mysqldump --opt --quick --quote-names -u joe -p db_name > /home/httpd/web/db_name.sql
Now you can use gzip to compress db_name.sql and scp it over to the new server.
On your new server use phpmyadmin to create a new database and user. Yes, you can do it at the command prompt but phpmyadmin is easier and faster…at least for me. If you’re using ISPConfig then it’s a piece of cake to install phpmyadmin and begin using it.

Once you have your database and user created and you have db_name.sql uncompressed using gzip then do this to load it:
mysql -u joe –p db_name < /var/www/web2/web/db_name.sql
9) Access to websites created by ISPConfig is NOT available directly by IP address. You can get around this by modifying the “hosts” file on your Windows or Linux desktop computer to include the domain and IP address of your new website. Your PC will look to the hosts file first before going out to dns servers when trying to resolve your domain name.
In my case this was a problem because I still needed to access my old domain so here’s what I did... I took an old Pentium-III computer I had with Windows 2000 on it. I changed the hosts file on that computer as described above. Next I downloaded TightVNC and installed it on the old computer and my primary Windows XP desktop. VNC works with Windows or Linux to create a remote desktop. I setup the old Win2k PC as a VNC server and the WinXP PC as a client. Now I could control and view the old and new websites from a single keyboard and monitor. http://www.tightvnc.com/

10) Your desktop PC caches dns information. This can cause problems accessing your new server AFTER you have made the transfer to your new nameservers (NS3 & NS4 as discussed earlier). I was unable to access my new server’s Dovecot POP3 email from my WinXP PC using Outlook until I flushed the dns cache and then rebooted. Here’s the command to flush the cache on a Windows box:
C:\>ipconfig /flushdns

That’s it! I spent about 3 weeks preparing for this server move so the actual move took less than 2 days including time to get all of my applications configured and install several security programs. The actual downtime was only a few hours.

CentOS 5.4 64bit (the Perfect Setup)
ISPConfig 2.2.40
WP3 Photography

Last edited by wpwood3; 5th November 2007 at 06:16.
Reply With Quote
The Following 7 Users Say Thank You to wpwood3 For This Useful Post:
4walters (9th July 2008), falko (6th November 2007), grasomega (17th November 2007), lubos (13th November 2007), mattias (12th November 2007), rvakili (29th January 2009), sajo (13th October 2009)
Sponsored Links


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
[Multiple ISPConfig servers] Howto select best server for remoting account creation? krakoukas Installation/Configuration 4 8th July 2007 20:01
Moving ISPConfig to new server ACDII Installation/Configuration 2 6th July 2007 16:09
backup and moving to another server with all ISPC users and data tom General 4 10th October 2006 16:05
server blocked/stopped by host Ovidiu Technical 11 14th February 2006 11:50
Server can't "see" the internet Luciano Installation/Configuration 8 23rd August 2005 00:22

All times are GMT +2. The time now is 06:54.

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