Hi All, This is a script that I use to migrate dbmail-2.0 to dbmail 2.2.1 on a mysql test server.
Maby you can adapt it for postgresql -- Cordialement / Best regards Jacques Beaudoin Agent d'administration Les services des technologies de l'information et des communications Commission scolaire de la Pointe de l'Île ----- Message de [email protected] --------- Date : Fri, 01 Dec 2006 18:47:55 -0500 De : Matthew O'Connor <[email protected]> Répondre à : DBMail mailinglist <[email protected]> Objet : Re: [Dbmail] postgresql migrate 2.0 to 2.2 À : DBMail mailinglist <[email protected]>
Aaron Stone wrote:On Fri, Dec 1, 2006, Matthew O'Connor <[email protected]> said:Totally non-scientific and based on my memory, after I got the process down (I scripted everything on a test server), it took me maybe about 2 hours for about 6G of data on an 64 with a decent SATA drive, using PostgreSQL 8.1. It was a lot slower, but just before 2.2 was release Paul made a significant speed-up in the envelope created code.Is the schema and dbmail-util -ay, or just one or the other?Again my memory is a bit shaky, but I think that time was the total time for my script to run, which included: Shutting down services (postfix, dbmail-imap etc...), adding the new tables and running dbmail-util -ay. After that I did some manual double checking to make sure things looked OK, started imap on a non-standard port to test etc. Then manually brought all the services back up.I highly recommend testing your upgrade on a test server, I ran into many problems before I finally got up an running on 2.2, and 2.2 daemons can *NOT* run against a 2.0 database.The issue isn't if we can run 2.2 daemons on a 2.0 database; what's in question is if DBMail 2.2 can run with all 2.2 header tables emptied out.Nope.So the process that I'm hoping will be possible (but haven't tested at all!), given that we start with 2.0 daemons and 2.0 database: Add new 2.2 columns and tables, while 2.0 services are running.I don't think that will work, because it changes the data types of some of the columns and that may cause problems. The the schema additions will be Ok, but you aren't talking about saving much time.Take down 2.0 services. Update messageblks columns, total read-write locks at this time. Start up 2.2 services.Again, I don't think this will work. You will I supposed be able to start up Postfix at this point and receive mail, but I sure wouldn't want to be inserting email into a half converted database that might need to get thrown out if I have a problem.Generate header cache table entries, while 2.2 services are running. The goal is to minimize downtime to the text->bytea conversion time. I do not know if this will actually work. If someone can try this on a backup and report back, I would greatly appreciate the data.Again, I don't think so, but as with all conversion, I would test the hell out of it on a non-production test server before I do anything. If you find any interesting results, I would like to hear about it. Matt _______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
----- Fin du message de [email protected] ----- ---------------------------------------------------- Ce message a été acheminé par le Webmail de la CSPI.
migrate.sh
Description: Bourne shell script
