Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Need suggestions for moving some messags from one DB to another.

Quote Reply
Need suggestions for moving some messags from one DB to another.
OK, so I recently upgraded my primary server. Before I did I backed up EVERYTHING to my back-up server. Apparently this included the cronjobs, so when my primary came back online the back-up server was checking into the webmail account with incoming.pl and grabbing the messages. Blush I have about 700 messages in the mySQL DB on the back-up server that I need to move into the mySQL DB on my primary server.

I obviously can't just import them as-is because both the primary and back-up have been running independently so I will have conflicting msg ids.

Does anybody have any ideas on how I can move the messages from the back-up to the primary with the least pain and suffering?

Not sure if what I have described makes much sense so let me know if you need more details.

Thanks in advance!
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] Need suggestions for moving some messags from one DB to another. In reply to
OK, short of other people making suggestions, here's what I have been thinking. Chime in if you think this will/will not work:

I've used mysqlman to export the msg tables with missing messages from my backup database. I'm sure I can't just import those into my main db because there will be conflicting msg_ids. So I was thinking that I would search and replace all of the msg_ids from the backup database to some set of numbers higher than those in the primary database so there is no chance for conflict. Like add a "1" to the front of each msg_id. Not sure if this would break anything.

The only other issue I can see is moving all of the attachments from the backup server to the primary, but this seems pretty straightforward. I just move all of the files in the data/msgs directory from the backup that don't exist on the primary.

So, what am I missing/forgetting? Will this work?

thanks for any comments,
Michael Coyne
seaturtle.org