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 31st August 2009, 13:53
ovredsson ovredsson is offline
Junior Member
 
Join Date: Mar 2008
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation master-master replication of the mailserver managed by ISPConfig

Hi,
I have ispconfig 3 running on one machine and want to take a backup.

How do i do that ?

I have a new machine with a clean ispconfig 3. I want to restore the backup to this one .

Sql, Mail, user data everything needs to be in the backup.

//Peter

Last edited by ovredsson; 31st August 2009 at 13:58.
Reply With Quote
Sponsored Links
  #2  
Old 1st September 2009, 11:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,419
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

I have not tested this yet, but the basic steps are as follows:

1) Mkake a backup of the ispconfig database on the new server.
2) copy the ispconfig database from the old server to the new server.
3) copy the lines with the web* users from the /etc/passwd and /etc/shadow file to the new server. Do the same with the cliant* groups in /etc/group file.
4) Copy the /var/vmail folder to the new server. Make sure that you preserver the permissions e.g. by storing the files and folders with

tar pcfz vmail_backup.tar.gz /var/vmail

ond the old server and then unpacking them on the new server.
5) Do the same with the websites in /var/www (or /srv/www if you use opensuse).
6) Migrate the website databases to the new server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 1st September 2009, 13:51
ovredsson ovredsson is offline
Junior Member
 
Join Date: Mar 2008
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thank you!

I will try this !
Reply With Quote
  #4  
Old 2nd September 2009, 10:19
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Hi,
Do you think that procedure will work also with a script who make an exact copy of the primary one?
As I wrote in another post (but at the moment I haven't receive yet answer), I need to replicate the mail server, so that the primary test crash, I can use the backup one...
I tried the expert mode installation of ISPConfig, but in that way I can just connect the secondary server to the ISPConfig database of the primary server... and it's not what I need, because if the primary server crash, the second one is not working at all.

So, reading this post, I was thinking to create a kind of script who just copy the important configuration files of ISPConfig to the secondary server (let's say every 5 seconds), so I will have exatly the copy of the primary server.
Do you think it's a good idea?

I can imagine that there are at least 2 problems:
1)find the way to skip automaticaly to the second server if the first one is not working properly.
2)if for example the first server crash after an error in the database, I don't want to have a copy of that error in the second server... (I don't know if this point is really important).

Any idea?
Thanks

Michele
Reply With Quote
  #5  
Old 2nd September 2009, 10:28
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,419
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Replicating just the mail part might be easier. I would try to use the following solution:

1) Create a distributed storage with glusterfs and mount it as /var/vmail so that both servers use the same email files:

http://www.howtoforge.com/high-avail...torage-servers

2) Use mysql replication to replicate the content of the ispconfig database from the master server to the slave.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 2nd September 2009, 11:22
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Hi Till,
thank you very much for your suggestion.
I'll try to solve the problem in the way that you told me.
Just another question: what about this point?
Quote:
3) copy the lines with the web* users from the /etc/passwd and /etc/shadow file to the new server. Do the same with the cliant* groups in /etc/group file.
Thanks
Michele
Reply With Quote
  #7  
Old 2nd September 2009, 11:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,419
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

This is only nescessary for servers which host websites too and not for mail servers.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 2nd September 2009, 11:47
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Great!

So I have to mount this new distributed storage in /var/vmail(I've to create a server-client side in each server), install ISPConfigin in both servers and after use mysql replication and it should work, right?

Sorry, but I don't have a lot of experience... I'm just discovering a new world...

Regards
Michele
Reply With Quote
  #9  
Old 2nd September 2009, 12:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,419
Thanks: 812
Thanked 5,205 Times in 4,081 Posts
Default

Yes, that should work. But please do not use the ispconfig interface on the second server as it will cause conflicts with the data replication.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 2nd September 2009, 12:33
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
 
Default

Ok perfect.

Let's work now...

I think that the Glusterfs configuration could be like that: http://www.gluster.org/docs/index.ph...ng_DHT_and_AFR
I think we are in the case of Distributed Replicated Storage. Isn't it?

Thanks
Michele

Last edited by voltron81; 2nd September 2009 at 12:36.
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
How to use an external mailserver within ISPConfig? Hans General 8 3rd September 2009 19:37
Master master Mysql replication with ignore table wxman HOWTO-Related Questions 2 5th May 2009 22:25
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 14:31
Mailserver Migration To ISPConfig Server asyadiqin Installation/Configuration 1 9th January 2007 10:33
Security Issue in Mailserver after ISPConfig installation bogdinator Installation/Configuration 8 31st October 2006 12:00


All times are GMT +2. The time now is 19:58.


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