[thelounge] HowTo: dbmail2 -> dbmail3 migration

Reindl Harald h.reindl at thelounge.net
Sun Feb 19 16:47:45 UTC 2012


hi

first many thanks to Paul J. Stevens, the upstream-developer
for a wonderful cooperation fixing the last small bugs

here is a complete sample how to migrate dbmail-2.x to dbmail-3.0
while new messages are received with postfix as long it is configured
to use a available replication-salve as fallback and using native
systemd-units for all relevant services

including systemd-units for dbmail/dovecot-proxy/mysqld
including also my SPEC-files for building the relevant services
transition was done with self built RPMs
_____________________________________________

the convert-sql-script for the database scheme is derived from
last upstrea-snapshot and optimized, hopefully this will be
included and optimized in the source-tarball

be aware that the dbmail3-package in fedora is a outdated RC
even the 3.0 became many bugixes the last two weeks
the fedora-maintainer should upgrade as soon as possible!
this was the exactly snapshot we have used
http://git.dbmail.eu/paul/dbmail/commit/?id=713013e8cb8138d8b951d9edf8ca592e90a084f7
_____________________________________________

transition-log over 60.000 messages with 8.5 GB in real production

Feb 17 22:00:02 dbmail-migration: allow incoming only from spamfirewall
Feb 17 22:00:03 dbmail-migration: stop internal mailservices
Feb 17 22:00:19 dbmail-migration: upgrade dbmail from internal testing-repo before conversion
Feb 17 22:00:21 dbmail-migration: flush mysql tables to disk
Feb 17 22:00:21 dbmail-migration: stop mysqld temorary to switch config without binlog
Feb 17 22:00:24 dbmail-migration: switch to mysqld-config WITHOUT binlog
Feb 17 22:00:24 dbmail-migration: remove existing binlog files
Feb 17 22:00:24 dbmail-migration: start mysqld again for main-transition
Feb 17 22:00:27 dbmail-migration: make sure postfix is running to queue incoming mails
Feb 17 22:00:27 dbmail-migration: move prepared configurations to service-config
Feb 17 22:00:27 dbmail-migration: dbmail database-schema-migration started
Feb 17 22:24:12 dbmail-migration: '/usr/sbin/dbmail-util -by' called
Feb 17 23:08:33 dbmail-migration: '/usr/sbin/dbmail-util -My -m 750000' called
Feb 17 23:46:30 dbmail-migration: compress/defrag tables to shrink old data-files for efficient backup-re-init
Feb 17 23:46:58 dbmail-migration: dbmail database-schema-migration finished
Feb 17 23:46:58 dbmail-migration: flush mysql tables to disk
Feb 17 23:47:00 dbmail-migration: backup-re-init started
Feb 17 23:50:17 dbmail-migration: backup-re-init finished
Feb 17 23:50:17 dbmail-migration: switch to mysqld-config WITH binlog before final start
Feb 17 23:50:17 dbmail-migration: start mysqld again with new binary logs
Feb 17 23:50:21 dbmail-migration: flush all OS buffers to disk for safety if something crashs now
Feb 17 23:50:21 dbmail-migration: starting internal mailservices
Feb 17 23:50:22 dbmail-migration: hard restarting postfix for safety it falls back to the master-mysqld
Feb 17 23:50:22 dbmail-migration: give postfix time to startup, otherwise 'postqueue' will fail in the next step
Feb 17 23:50:37 dbmail-migration: deliver all queued messages now
Feb 17 23:50:37 dbmail-migration: switch firewall in default-mode
Feb 17 23:50:38 dbmail-migration: upgrade finished and normal operations resumed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbmail3-migration.zip
Type: application/zip
Size: 49603 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20120219/7f454853/attachment-0001.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20120219/7f454853/attachment-0001.sig>


More information about the devel mailing list