RE: [qmailtoaster] MYSQL help
Hello all, Thanks Quinn, your method is essentially what I am currenlty doing, except I'm not using ssh, as the transfers all take place on the local lan and are not visible to the public, so security is not a problem. So the general consensus is that in terms of qmail the dump is the preferred method? Given that's what I know I don't mind. Thanks for the responses, Erik I will read through that link so at least I know what is involved. The backup server will only import the vpopmail database when data has changed using my current script, and it seems to work quite well. Are there any concerns running a dump on the primary server every few minutes? thanks again. Craig -Original Message- From: Quinn Comendant [mailto:[EMAIL PROTECTED] Sent: 09 October 2006 17:47 To: qmailtoaster-list@qmailtoaster.com Subject: Re: [qmailtoaster] MYSQL help Hi Craig I've tried setting up replication before but was frightened by its complexity. I might suggest just using mysqldump. The vpopmail table should not be updated that frequently (only when accounts are added/edited/deleted), is probably not too large (how many users?), and your second server is not live. So copying the vpopmail table every ten minutes or so should be fine. You can run a command to pull the data across from the second server over a ssh tunnel: ssh -C [EMAIL PROTECTED] mysqldump --databases -u USERNAME -pPASSWORD vpopmail | mysql -u -pPASSWORD; Quinn On Mon, 9 Oct 2006 15:33:41 +0100, Craig Smith wrote: How do I go about configuring mysql to specifically replicate the vpopmail database to my backup server so that the backup server always has an up to date copy of the mysql database? I can manage without that, but I think it would be more efficient method. - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [qmailtoaster] MYSQL help
Hi Craig I've tried setting up replication before but was frightened by its complexity. I might suggest just using mysqldump. The vpopmail table should not be updated that frequently (only when accounts are added/edited/deleted), is probably not too large (how many users?), and your second server is not live. So copying the vpopmail table every ten minutes or so should be fine. You can run a command to pull the data across from the second server over a ssh tunnel: ssh -C [EMAIL PROTECTED] mysqldump --databases -u USERNAME -pPASSWORD vpopmail | mysql -u -pPASSWORD; Quinn On Mon, 9 Oct 2006 15:33:41 +0100, Craig Smith wrote: How do I go about configuring mysql to specifically replicate the vpopmail database to my backup server so that the backup server always has an up to date copy of the mysql database? I can manage without that, but I think it would be more efficient method. - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [qmailtoaster] MYSQL help
Quinn Comendant wrote: I might suggest just using mysqldump. The vpopmail table should not be updated that frequently (only when accounts are added/edited/deleted), is probably not too large (how many users?), and your second server is not live. So copying the vpopmail table every ten minutes or so should be fine. You can run a command to pull the data across from the second server over a ssh tunnel: ssh -C [EMAIL PROTECTED] mysqldump --databases -u USERNAME -pPASSWORD vpopmail | mysql -u -pPASSWORD; Quinn, you are ONE of the coolest here... Sending this one to my archive. --michael - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [qmailtoaster] MYSQL help
Craig Smith wrote: Hi there, I'm currently working on a setup and scripts that will give our company a failover server that we can immediately switch to in the event of failure without clients ever knowing it was off. I am planning of putting this in the wiki if people are interested. As part of my solution I am using a mysqldump and import, but I've heard that mysql can replicate the database live. I have used this and mysqldump is better for the following reasons (BTW I have used SQL extensively and have set up this exact same scenario, to include Sybase and Unify): 1) Unless you have SERIOUS Support for the DB back end in terms of a robust database setup, in the case of MySQL, InnoDB tables, RAID, etc. The replication is not worth the headache. 2) In my experience, the way MySQL is typically used on the internet, it is a quick and dirty database, works well, is relatively easy to set up... BUT... 3) When dealing with databases, replication (IMHO) lends itself to relatively HIGH END equipment, large databases, as well as huge amounts of sensitive data (not that your email accounts aren't sensitive). So unless your benefactor (whether it be yourself or other) is willing to invest in a minimum of 2 identical servers just for databases and replication, MySQL is fast enough and there is probably not that many rows of data to be worth replication. Typically to do this (in a way I consider philosophically worth while), replication is not needed, and it is much more prudent to dump and restore. 4) In a nutshell, unless you have millions of rows of sensitive data, the complexity tradeoff is not worth it. How do I go about configuring mysql to specifically replicate the vpopmail database to my backup server so that the backup server always has an up to date copy of the mysql database? I can manage without that, but I think it would be more efficient method. Either way though, with the procedure I'm finalising, should our server A go down server B will take over it's role with minimal amount of input. Or with the right script automatically. Server B will be up to date in terms of A up to the last minute before failure. This includes uncollected mail etc. Accounts only have to be created on the main server, the changes will replicate to the backup server every minute. (or x time frame as scheduled) So I guess this post is two fold, are people interested in a method for the above, or are there already loads of solutions out there, and how does one configure mysql for replication. Bearing in mind my SQL knowledge is nil. I've only just started getting to grips with scripting so that's a later project. :-) Thanks in advance. Craig --- Craig Smith - Systems Engineer - Doctor Net t. 0870 770 4990 - f. 0870 770 4991 Visit www.doc-net.com - let us be your key to success Visit www.eMailCampaigner.com - close sales cheaper and faster Visit www.SprintCRM.com - understand your customers better and increase sales --- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you received this in error, please contact the sender and delete the material. - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - QmailToaster hosted by: VR Hosted http://www.vr.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]