Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th May 2011, 02:02
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 478
Thanks: 78
Thanked 39 Times in 33 Posts
Default New master for the slave

This thread is split from http://www.howtoforge.com/forums/showthread.php?t=52697 to deal with new master aspect.

Having had the Master in a multi server setup die, I have now built a new master with ispconfig 3 on debian lenny using exactly the same details and host name as before.

I do have a copy of all the old databases and files on the old master. What databases do i need to import again into the new master for it to 'remember' all the records it had before and start behaving as the master of it's slave?

It's not imperitive it remembers it's own records vhosts and mail accounts but it must be able to take over as master of the slave again to administer it.
Reply With Quote
Sponsored Links
  #2  
Old 19th May 2011, 11:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Import the ispconfig database (its just one mysql database) plus the permission records of the Mysql "mysql" database for the mysql users of the slaves.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 19th May 2011, 12:01
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 478
Thanks: 78
Thanked 39 Times in 33 Posts
Default

Thanks. Should I completely drop both databases and replace with the back ups or import the additional records?

I did try this yesterday with other experiments and all appeared to work, but as soon as I made any record changes in ispconfig it seemed to loose communication with the two slaves.

After messing about with it too much it's now completely locked me out the control panel.

Just so I'm clear when I do it later, I could do something like this:

Mysql etc

Drop database dbispconfig;
Create database dbispconfig;
dbispconfig < myispconfigbackupfile.sql;

And then exactly the same for database mysql

Yes?

Thanks for your help. I'm desperate to get this online again by the weekend.
Reply With Quote
  #4  
Old 19th May 2011, 12:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Quote:
Thanks. Should I completely drop both databases and replace with the back ups or import the additional records?
No, thats different for both databases.

1) ISPConfig database: drop it and replace it with the db from the backup.

2) mysql.mysql Database: export only all ispcsrv* users from all tables in the mysql database and import them in the database on the new server.

Please make backups of both databases on the new server before you start, so that you can restore them in case that something goes wrong
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 19th May 2011, 14:01
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 478
Thanks: 78
Thanked 39 Times in 33 Posts
Default

I was with you up till the second point...

Are you suggesting I import the old mysql database into a new database and then export all ispcsrv records and then import them into the new master mysql database? Use phpmyadmin for this process?

Are these user records scattered across several tables in the mysql database?

Sorry for all the questions, I know I'll need the answers tonight when there's nobody on hand to ask.

Thanks
Reply With Quote
  #6  
Old 19th May 2011, 15:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

I would export the mysql user records of the ispcsrv users from the old Databse with phpmyadmin.

Quote:
Are these user records scattered across several tables in the mysql database?
Yes.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
Toucan (24th May 2011)
  #7  
Old 21st May 2011, 19:46
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 478
Thanks: 78
Thanked 39 Times in 33 Posts
Default

Thanks. That seemed to work. At last I can sleep at night.

Now stage two is mail and web recovery. I'm fairly happy with recovering the websites.

But, is it possible to recover the old messages? I tried copying the content of vmail for mailbox for a user to the new server but that reported some horrible results when viewing the imap folder in squirrel.

Any ideas welcome?
Reply With Quote
  #8  
Old 24th May 2011, 21:31
Toucan Toucan is offline
Senior Member
 
Join Date: Dec 2009
Posts: 478
Thanks: 78
Thanked 39 Times in 33 Posts
 
Default Solved

Quote:
Originally Posted by Toucan View Post
Thanks. That seemed to work. At last I can sleep at night.

Now stage two is mail and web recovery. I'm fairly happy with recovering the websites.

But, is it possible to recover the old messages? I tried copying the content of vmail for mailbox for a user to the new server but that reported some horrible results when viewing the imap folder in squirrel.

Any ideas welcome?
when vmail directories were recovered they were done with root user changing ownership.

Code:
chown -R vmail:vmail /var/vmail/oneofmydomains.com/mymail
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
Master failed -promote slave Toucan General 5 17th May 2011 09:31
Change Master <> Slave Petr Installation/Configuration 3 25th August 2010 16:07
Fedora 13 BIND Server wont start. ev0css Installation/Configuration 1 23rd June 2010 22:16
Master and Slave ISP scandal32 Installation/Configuration 2 13th June 2010 21:55
DNS views with Master and Slave servers howto guytools Server Operation 0 24th May 2009 00:19


All times are GMT +2. The time now is 03:01.


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