Vconvert Backend: Difference between revisions
Jump to navigation
Jump to search
(Created page with "1) Migration to new host a) On destination host Install QMT/CentOS 7, instructions here. toaststat (make sure all services are running) b) On source [cdb] host dhost=192.168.1.3 (change destination [mysql] host to suit) ssh-keygen ssh-copy-id $dhost ssh $dhost (test, no password should be required) # The first rsync migrates the bulk of the email database with vpasswd files except those queued during sync rsync --progress -zv -are ssh /home/vpopmail/domains/ root@$dho...") |
No edit summary |
||
Line 1: | Line 1: | ||
1) Migration to new host | 1) Migration to new host | ||
a) On destination host | a) On destination host | ||
Install QMT/CentOS 7, instructions here. | Install QMT/CentOS 7, instructions here. | ||
toaststat (make sure all services are running) | toaststat (make sure all services are running) | ||
b) On source [cdb] host | b) On source [cdb] host | ||
dhost=192.168.1.3 (change destination [mysql] host to suit) | dhost=192.168.1.3 (change destination [mysql] host to suit) | ||
ssh-keygen | ssh-keygen | ||
ssh-copy-id $dhost | ssh-copy-id $dhost | ||
ssh $dhost (test, no password should be required) | ssh $dhost (test, no password should be required) | ||
# The first rsync migrates the bulk of the email database with vpasswd files except those queued during sync | # The first rsync migrates the bulk of the email database with vpasswd files except those queued during sync | ||
rsync --progress -zv -are ssh /home/vpopmail/domains/ root@$dhost:/home/vpopmail/domains | rsync --progress -zv -are ssh /home/vpopmail/domains/ root@$dhost:/home/vpopmail/domains | ||
# Stop qmail/dovecot on source host and destination hosts | # Stop qmail/dovecot on source host and destination hosts | ||
qmailctl stop && systemctl stop dovecot | qmailctl stop && systemctl stop dovecot | ||
# The second rsync, services stopped, migrates the balance of the email database | # The second rsync, services stopped, migrates the balance of the email database | ||
# and control files | # and control files | ||
rsync --progress -zv -are ssh /home/vpopmail/domains/ root@$dhost:/home/vpopmail/domains | rsync --progress -zv -are ssh /home/vpopmail/domains/ root@$dhost:/home/vpopmail/domains | ||
rsync --progress -zv -are ssh /var/qmail/control/ root@$dhost:/var/qmail/control | rsync --progress -zv -are ssh /var/qmail/control/ root@$dhost:/var/qmail/control | ||
rsync --progress -zv -are ssh /var/qmail/users/ root@$dhost:/var/qmail/users | rsync --progress -zv -are ssh /var/qmail/users/ root@$dhost:/var/qmail/users | ||
rsync --progress -zv -are ssh /etc/tcprules.d/ root@$dhost:/etc/tcprules.d | rsync --progress -zv -are ssh /etc/tcprules.d/ root@$dhost:/etc/tcprules.d | ||
rsync --progress -zv -are ssh /etc/dovecot/toaster.conf root@$dhost:/etc/dovecot | rsync --progress -zv -are ssh /etc/dovecot/toaster.conf root@$dhost:/etc/dovecot | ||
rsync --progress -zv -are ssh /etc/dovecot/local.conf root@$dhost:/etc/dovecot | rsync --progress -zv -are ssh /etc/dovecot/local.conf root@$dhost:/etc/dovecot | ||
# Not necessary to the migration | # Not necessary to the migration | ||
rsync --progress -zv -are ssh /usr/share/toaster/include/admin.pass root@$dhost:/usr/share/toaster/include | rsync --progress -zv -are ssh /usr/share/toaster/include/admin.pass root@$dhost:/usr/share/toaster/include | ||
rsync --progress -zv -are ssh /usr/share/toaster/include/admin.htpasswd root@$dhost:/usr/share/toaster/include | rsync --progress -zv -are ssh /usr/share/toaster/include/admin.htpasswd root@$dhost:/usr/share/toaster/include | ||
rsync --progress -zv -are ssh /usr/share/squirrelmail/plugins/ root@$dhost:/usr/share/squirrelmail/plugins | rsync --progress -zv -are ssh /usr/share/squirrelmail/plugins/ root@$dhost:/usr/share/squirrelmail/plugins | ||
rsync --progress -zv -are ssh /etc/spamassassin/.spamassassin/ root@$dhost:/etc/spamassassin/.spamassassin | rsync --progress -zv -are ssh /etc/spamassassin/.spamassassin/ root@$dhost:/etc/spamassassin/.spamassassin | ||
rsync --progress -zv -are ssh /etc/spamassassin/local.cf root@$dhost:/etc/spamassassin | rsync --progress -zv -are ssh /etc/spamassassin/local.cf root@$dhost:/etc/spamassassin | ||
rsync --progress -zv -are ssh /var/lib/squirrelmail/prefs/ root@$dhost:/var/lib/squirrelmail/prefs | rsync --progress -zv -are ssh /var/lib/squirrelmail/prefs/ root@$dhost:/var/lib/squirrelmail/prefs | ||
c) On destination host | c) On destination host | ||
# Convert vpasswd files to mysql vpopmail db, aliases must be handled manually | # Convert vpasswd files to mysql vpopmail db, aliases must be handled manually | ||
/home/vpopmail/bin/vconvert -c -m | /home/vpopmail/bin/vconvert -c -m | ||
qmailctl cdb && qmailctl start && sleep 2s && systemctl start dovecot && toaststat | qmailctl cdb && qmailctl start && sleep 2s && systemctl start dovecot && toaststat | ||
2) In place conversion* | |||
# qmailctl stop && systemctl stop dovecot | |||
# yum install -y yum-utils | |||
# yum-config-manager --enable qmt-current | |||
# yum reinstall qmail qmailadmin dovecot* ezmlm* vpopmail vqadmin | |||
# /home/vpopmail/bin/vconvert -c -m | |||
# qmailctl start && sleep 2s && systemctl start dovecot && toaststat | |||
* Aliases must be done manually. | |||
Will convert to many domain format if | |||
vpopamil was compiled with this option | |||
Questions, comments, suggestions, corrections...contact Eric on the QMT list | |||
Questions, comments, suggestions, corrections...contact Eric on the QMT list |
Revision as of 20:07, 29 March 2024
1) Migration to new host
a) On destination host Install QMT/CentOS 7, instructions here. toaststat (make sure all services are running)
b) On source [cdb] host dhost=192.168.1.3 (change destination [mysql] host to suit) ssh-keygen ssh-copy-id $dhost ssh $dhost (test, no password should be required)
# The first rsync migrates the bulk of the email database with vpasswd files except those queued during sync rsync --progress -zv -are ssh /home/vpopmail/domains/ root@$dhost:/home/vpopmail/domains
# Stop qmail/dovecot on source host and destination hosts qmailctl stop && systemctl stop dovecot
# The second rsync, services stopped, migrates the balance of the email database # and control files rsync --progress -zv -are ssh /home/vpopmail/domains/ root@$dhost:/home/vpopmail/domains rsync --progress -zv -are ssh /var/qmail/control/ root@$dhost:/var/qmail/control rsync --progress -zv -are ssh /var/qmail/users/ root@$dhost:/var/qmail/users rsync --progress -zv -are ssh /etc/tcprules.d/ root@$dhost:/etc/tcprules.d rsync --progress -zv -are ssh /etc/dovecot/toaster.conf root@$dhost:/etc/dovecot rsync --progress -zv -are ssh /etc/dovecot/local.conf root@$dhost:/etc/dovecot
# Not necessary to the migration rsync --progress -zv -are ssh /usr/share/toaster/include/admin.pass root@$dhost:/usr/share/toaster/include rsync --progress -zv -are ssh /usr/share/toaster/include/admin.htpasswd root@$dhost:/usr/share/toaster/include rsync --progress -zv -are ssh /usr/share/squirrelmail/plugins/ root@$dhost:/usr/share/squirrelmail/plugins rsync --progress -zv -are ssh /etc/spamassassin/.spamassassin/ root@$dhost:/etc/spamassassin/.spamassassin rsync --progress -zv -are ssh /etc/spamassassin/local.cf root@$dhost:/etc/spamassassin rsync --progress -zv -are ssh /var/lib/squirrelmail/prefs/ root@$dhost:/var/lib/squirrelmail/prefs
c) On destination host # Convert vpasswd files to mysql vpopmail db, aliases must be handled manually /home/vpopmail/bin/vconvert -c -m qmailctl cdb && qmailctl start && sleep 2s && systemctl start dovecot && toaststat
2) In place conversion*
# qmailctl stop && systemctl stop dovecot # yum install -y yum-utils # yum-config-manager --enable qmt-current # yum reinstall qmail qmailadmin dovecot* ezmlm* vpopmail vqadmin # /home/vpopmail/bin/vconvert -c -m # qmailctl start && sleep 2s && systemctl start dovecot && toaststat * Aliases must be done manually. Will convert to many domain format if vpopamil was compiled with this option
Questions, comments, suggestions, corrections...contact Eric on the QMT list