#1  
Old 24th February 2006, 07:10
juampi juampi is offline
Member
 
Join Date: Aug 2005
Location: Argentina
Posts: 44
Thanks: 0
Thanked 1 Time in 1 Post
Default Moving ISPconfig

Hi All!
I need moving ISPconfig from Server A to Server B.
Server A is a server in production. This must be repaire. I need moving all ispconfig: acounts, emails, passwords, webs...
I have backup of Server A:
/etc
/home/www
/var/lib/mysql

How can i do it?.

I think make:
1- Install software in Server B: postfix, mysql, php, apache, courier, proftpd and others.
2- Install a new ISPconfig
3- Replace the files /etc /home /var/lib/mysql

Is it correct?

I can't install a software for backup. I only can use scp or rsync.

Regards,
Reply With Quote
Sponsored Links
  #2  
Old 24th February 2006, 09:17
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Make a backup of /etc/passwd, /etc/shadow, /etc/group, Vhosts_ispconfig.conf, /etc/postfix/local-host-names, /etc/postfix/virtusertable, named.conf, all the pri.* zone files, /etc/proftpd*.conf. Also create sql dumps of your MySQL databases (either with phpMyAdmin or on the command line: http://www.howtoforge.com/faq/6_3_en.html ) and make a backup of /home/www on the old server:

Code:
cd /home
tar -pczf www.tar.gz www/
Stop Postfix:
Code:
/etc/init.d/postfix stop
If you use mbox, also make a backup of /var/spool/mail:
Code:
cd /var/spool
tar -pczf mail.tar.gz mail/
If you use Maildir, the mailboxes are included in www.tar.gz.

On the new server:
First install ISPConfig.
Create the databases from the sql dumps (either with phpMyAdmin or like this: http://www.howtoforge.com/faq/6_4_en.html ). Also replace the ISPConfig database with the old one.
Regarding the mysql database: have a look at the users and db table and add the user /db lines that don't exist on the new server but on the old server.
Copy local-host-names and virtusertable to /etc/postfix; open local-host-names and replace the old hostname with the new one. Run
Code:
postmap /etc/postfix/virtusertable
and restart Postfix.
Replace Vhosts_ispconfig.conf with the one from the old server; then open it and replace the old IP address with the new one. Transfer www.tar.gz to /home and unpack it:
Code:
cd /home
mv www www_orig
tar xvfz www.tar.gz
If you had to make a backup of /var/spool/mail, transfer mail.tar.gz to /tmp and do this:
Code:
cd /tmp
tar xvfz mail.tar.gz
cd mail
cp -pf web* /var/spool/mail/
Have a look at your backups of /etc/passwd, /etc/shadow and /etc/group and add the lines that don't exist in these files on the new server to /etc/passwd, /etc/shadow and /etc/group on the new server.
Transfer named.conf and all pri.* files to the new server. Also all proftp*.conf files; open them and replace the old IP address with the new one - also do this with the file names of the proftpd*.conf files. Restart ProFTPd:
Code:
/etc/init.d/proftpd restart
Restart Apache:
Code:
/etc/init.d/apache restart
Log in to ISPConfig and go to Management -> Server -> Settings and change the IP address(es) there. Then go to the DNS Manager and also changes the IP addresses in the DNS records, if necessary.

On the old server, create a Postfix transport now so that all emails are forwarded to the ne server (for the time until the MX records of your domains have switched to the new server):
Code:
echo "*  smtp:[<IP address of new server>]" >> /etc/postfix/transport
postmap /etc/postfix/transport
/etc/init.d/postfix restart
On the new server, open /etc/postfix/local-host-names and add the hostname of the old server at the bottom so that the new server accepts the forwarded mails.


Lots of steps to do... (if you want, you can have Till and me do that, but it's not free. Have a look here: http://www.ispconfig.org/support.htm ).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:

Last edited by falko; 6th February 2008 at 16:32.
Reply With Quote
The Following 32 Users Say Thank You to falko For This Useful Post:
atrika (3rd March 2008), blocker (23rd April 2008), BorderAmigos (23rd August 2010), brody (26th June 2008), bswinnerton (13th May 2008), createch (22nd April 2011), DaRKNeSS666NL (25th May 2012), djd_bb (12th November 2008), esezako (21st April 2009), grasomega (26th January 2009), Killozap (18th January 2009), klaus++ (9th August 2009), kokez (7th September 2010), mturillo (27th October 2008), Numerizen (25th March 2009), NWO (23rd March 2010), oxxmoxx (19th June 2011), pepo (29th January 2008), reinier (25th October 2008), saul (17th January 2010), SeaWolf (31st January 2008), Snowman (31st July 2008), soho (30th May 2009), sonoracomm (23rd January 2009), SupuS (19th July 2008), T4NG0 (27th May 2009), titanium (9th April 2008), torusturtle (20th May 2007), ustoopia (5th July 2008), wr19026 (18th February 2009), wxman (5th April 2009), zetnsh (22nd January 2008)
  #3  
Old 26th February 2006, 13:21
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,266
Thanks: 82
Thanked 24 Times in 20 Posts
Default

your explanation worked all too beautiful for me, but I have one problem left: now root is the owner of /var/www and thats not ok. whats the easiest way to change back? could I not modify something in the ispconfig panel and click save - would that modify the sites ownership?

I could not get the part with /etc/passwd and /etc/shadow done before unpacking stuff (otherwise the ownership would have been preserved I guess)

whats the quickest way? to unpack again?

Last edited by Ovidiu; 26th February 2006 at 13:52.
Reply With Quote
  #4  
Old 26th February 2006, 20:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Did you do this on your old server?
Code:
cd /var
tar -pczf www.tar.gz www/
The p keeps the permissions and owners of all included files and directories.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 27th February 2006, 09:40
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,266
Thanks: 82
Thanked 24 Times in 20 Posts
Default

of course not. that was the problem.

ok, now that I don't have the original information I guess I will do the reinstall again, add sites, users and stuff manually and then only copy the really needed material into the subfolders...

thx for the help, your howto move from one server to another is great one juts has to be able to read to get it done ;-)
Reply With Quote
  #6  
Old 28th February 2006, 11:07
mphayesuk mphayesuk is offline
Senior Member
 
Join Date: Sep 2005
Location: UK, East Midlands
Posts: 517
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via MSN to mphayesuk
Default

"Also create sql dumps of your MySQL databases (either with phpMyAdmin or on the command line: http://www.howtoforge.com/faq/6_3_en.html )"

Is there a way to make a backup of the customer sql satabase if they have a password that you dont know from the command line. ie if I have 50 customers all with a sql database I dont want to have to type in the command line 50 times and find out what password they have.

Any thoughts
Reply With Quote
  #7  
Old 28th February 2006, 12:15
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,266
Thanks: 82
Thanked 24 Times in 20 Posts
Default

well I just used root and my rootmysql password, I do not know any clients passwords... if thats what you mean...
Reply With Quote
  #8  
Old 28th February 2006, 12:27
mphayesuk mphayesuk is offline
Senior Member
 
Join Date: Sep 2005
Location: UK, East Midlands
Posts: 517
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via MSN to mphayesuk
Default

No thats fine... it is what I was asking...
Reply With Quote
  #9  
Old 27th April 2006, 22:26
nenad nenad is offline
Senior Member
 
Join Date: Nov 2005
Location: Novi Sad, Serbia
Posts: 415
Thanks: 13
Thanked 5 Times in 5 Posts
Default

If there's two IP where's ISPConfig server, like
LAN:192.168.123.200 and WAN:87.116.136.92
LAN:192.168.123.201 and WAN:87.116.136.92

is it necessery that new production server is at the same LAN IP? Once when it is setup, and when all of the backup data is transfered onto him?
__________________
Nenad Bulatovic
---------------
Debian Lenny & ISPConfig 3

Last edited by nenad; 1st May 2006 at 20:25.
Reply With Quote
  #10  
Old 10th December 2007, 17:03
zeeman zeeman is offline
Junior Member
 
Join Date: Feb 2007
Posts: 22
Thanks: 7
Thanked 2 Times in 2 Posts
Send a message via ICQ to zeeman
Default

I've got a little quasion about postfixs transport:
Quote:
Originally Posted by falko
Code:
echo "smtp  *:[<IP address of new server>]" >> /etc/postfix/transport
postmap /etc/postfix/transport
/etc/init.d/postfix restart
I googled a little bit around to get to know what this line really does.
Everywhere I found the example
Code:
domain.tld smtp:[<IP address of new server>]
.domain.tld smtp:[<IP address of new server>]
So I'm a little bit confused which to use.
I want to forward all mails from server A to server B. A and B use the same configuration (same users, uids, guids, webs and so on)

Thanks for the good explanation at the start of this thread!
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
cannot access ispconfig site Nu2Linux Installation/Configuration 13 3rd January 2009 15:29
Users and websites aren't created Glorfindel Installation/Configuration 9 23rd February 2006 04:20
42goISP vs. ISPConfig nveid General 1 16th January 2006 09:07
Mirroring ISPConfig with DRBD rodriglm General 5 2nd January 2006 12:48
Moving mail in ISPConfig rodriglm General 3 7th December 2005 09:44


All times are GMT +2. The time now is 21:53.


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