Ah, sorry. I should have asked which version... I'd still think the same 
procedure would apply with PostgreSQL. Dump all DBs and then insert/update from 
old tables into a new DB tables with identical schema, making sure all PK's are 
unique.

>JR

From: [email protected] [mailto:[email protected]] 
On Behalf Of Jeremy McSpadden
Sent: Wednesday, October 30, 2013 11:47 AM
To: Baruwa users list
Subject: Re: [Baruwa] Merging Servers .. DB & Quarantined Mail

Baruwa 2 is Postgres. And it's community so no cluster. 2 standalone a boxes 
I'd like to keep messages from
--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net<http://www.fluxlabs.net/> | Endless 
Solutions
Office : 850-250-5590x101<tel:850-250-5590;101> | Cell : 
850-890-2543<tel:850-890-2543> | Fax : 850-254-2955<tel:850-254-2955>

On Oct 30, 2013, at 10:43 AM, "Morgan, Jeffrey R" 
<[email protected]<mailto:[email protected]>> wrote:
Were the older servers configured as a cluster w/ master-master MySQL 
replication? More importantly, would any PK auto_increment columns from your 
old DBs have overlapping values with the destination DB?

Do you just want the email/quarantine data synchronized, or everything? If it's 
just the message data, then a mysqldump & import for the message table should 
work fine provided all message ids are unique (they should be) and the same 
users are already configured on the destination server.

If you wanted everything imported then it might be best to do it table by table 
:

INSERT  INTO `newDB`.`table`
SELECT * FROM `oldDB`.`table`

For tables with unique auto_increment columns, specify column names rather than 
'*' just to make sure you're getting a unique auto_inc number/ID rather than 
using a [possibly] existent number/ID in the destination DB. If you're not 
certain all records are unique, then using INSERT IGNORE INTO is definitely the 
way to go.

http://www.gfisk.com/merge-data-from-two-databases/

>JR

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Jeremy McSpadden
Sent: Tuesday, October 29, 2013 7:26 PM
To: Baruwa users list
Subject: Re: [Baruwa] Merging Servers .. DB & Quarantined Mail

I want to decommission 2 old servers, but keep all data.
--
Jeremy McSpadden
Flux Labs, Inc | http://www.fluxlabs.net<http://www.fluxlabs.net/> | Endless 
Solutions
Office : 850-250-5590x101<tel:850-250-5590;101> | Cell : 
850-890-2543<tel:850-890-2543> | Fax : 850-254-2955<tel:850-254-2955>

On Oct 29, 2013, at 5:13 PM, "marco rosenstein" 
<[email protected]<mailto:[email protected]>> wrote:
If I'm not mistaken, the email store and quarantine data is stored in the same 
database as a host of other Baruwa data.   Just in separate tables all with 
references in between and whatnot.  In order to do this you would have to make 
some major changes to Baruwa itself, beyond tweaking settings.py.

It may be possible to point all the instances of Baruwa to the same database on 
a single server but I'm not sure if they would play nicely.  I think Andrew 
might be able to shed some light on this...

What problem are you trying to solve with this? There may be a simpler solution.
________________________________
From: [email protected]<mailto:[email protected]>
To: [email protected]<mailto:[email protected]>
Date: Mon, 28 Oct 2013 19:52:20 +0000
Subject: [Baruwa] Merging Servers .. DB & Quarantined Mail
I have 3 servers and would like to merge the quarantined/stored emails & 
databases together .. whats the best way to attempt this ?

--
Jeremy McSpadden
Flux Labs | http://www.fluxlabs.net<http://www.fluxlabs.net/> | Endless 
Solutions
Office : 850-250-5590x101 | Cell : 850-890-2543 | Fax : 850-254-2955


_______________________________________________ 
http://pledgie.com/campaigns/12056
_______________________________________________
http://pledgie.com/campaigns/12056
_______________________________________________
http://pledgie.com/campaigns/12056
_______________________________________________
http://pledgie.com/campaigns/12056

Reply via email to