Hello vpopmail users/devs, I wrote 2 small shell-scripts to ease a bit of the pain involved when migrating virtual domains from one physical host to a different host.
Both hosts need to have the exact same setup regarding UID/GID. The scripts also assume you have ssh and rsync installed. As a special feature, it can handle cdb and/or mysql as the vpopmail backend. I have not tested others. All sorts of feedback would be greatly appreciated! From the script header: # migrate vpopmail/qmail based virtualdomains from one host to another # without data loss and without major service interuption # Description # # The script automates the migration of a domain (including its alias # domains) # using rsync, ssh, and the normal vpopmail/qmail programs. # The migration consists of several steps: # - check the local existance of the domain # - if the vpopmail authentication backend is not cdb, use vconvert to # convert the authentication data to cdb (this has no impact on the # installation!) # - do an initial rsync of the email data # - stop qmail on new host and add the domains and aliases on the new # host # - stop local POP3/IMAP daemons # - remove virtualdomains from local qmail config and add smtproutes # - start local qmail # - run rsync one last time (remote qmail is still down) # - if the authentication backend is not cdb, convert the remote auth # data # - start local POP3/IMAP daemons # - start qmail on remote host # # The addition of domains and alias domains on the new host is handled # through the # sister script called 'migrateDomain_remote_add' # # For more comfort during the migration of your domains, use public key # authentication with ssh, so you don't have to enter the root password # over and over. # # ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION # # This script does NOT properly handle domains with hashed directories. # For those # domains, I'd manually add them on the new server, edit # /var/qmail/users/assign # to use the new path, run qmail-newu, and move the domain directory # into the # hashed directory before starting the migrateDomain script on the old # server. When # the old script calls migrateDomain_remote_add on the new server, which # runs # vadddomain, vadddomain would fail but the rest of the process would # proceed correctly (I think). thanx go to tom collins for the original work! -paul -- 0207 F4BD 060D 1442 BAB5 648F C7E9 D3F4 28D2 6EF8
migrateDomain_remote_add
Description: application/text
migrateDomain
Description: application/text