How to migrate a mailman mailinglist from one server to another =============================================================== --- Update 2009-08-29 --- Switched Servers again and it's getting kind of easier this time. Oldhost: a) Be root and # tar -cf /root/mailman-data.tar /var/lib/mailman b) scp mailman-data.tar to newhost Newhost: a) Install mailman, setup apache etc. b) As root # tar -xf mailman-data.tar c) rm -r /var/lib/mailman d) mv mailman /var/lib Now the mailinglist data is back in place and should've proper rights. The only thing which is now (at least in most cases) absolutely wrong is the hostname in the mailinglist configuration. At least the Debian mailman packages ships with some scripts to fix it. e) As root # withlist -l -r fix_url -u After that you should be done and the webfrontend for list configuration should be working again. --------------------------------------------------------------- ---- Recent note 2006-03-08 ---- This whole thingy is a little bit outdated and has only been used with mailman 1.x releases. With mailman 2.x a lot changed so that a 1.x -> 2.x migration is a lot more complex. In general most things here should still work but you've been warned! --------------------------------- Let's say we have a mailingliste test-list hostet on a server called srv1 and we want to migrate this list to a server called srv2. That's quite easy and can be done step by step. There is only one problem, you can not export a memberlist with all the passwords for import an the destination system. All users will get a new password for the webfrontend. Step 1: ======= Login on srv2 and add a new malinglist with the newlist comand --- newlist test-list --- Step 2: ======= Login through the webfrontend on srv1 and set the list into moderated mode and allow only new subscribtions with admin approval. So now you have the list in a quite freed state and you can begin to export all the data you need to set up the list on srv2. Step 3: ======= Export the configuration, memberlist and copy the mbox file to a directory so that you can tar and then scp them to srv2 (pathes to the commands are valid for Debian 3.0) --- bkupdir=/home/mlb/mlbkup mkdir $bkupdir #safe the configuration /var/lib/mailman/bin/config_list -o $bkupdir/config.out test-list #safe the memberlist /var/lib/mailman/bin/list_members -o $bkupdir/member.out test-list #cp the mbox file cp /var/lib/mailman/archives/private/test-list.mbox/test-list.mbox $bkupdir #and then tar it all cd /home/mlb/ tar -cj mlbkup -f /home/mlb/ml-backup.tar.bz2 #and scp it to the destination scp /home/mlb/ml-backup.tar.bz2 mlb@srv2: --- Step 4: ======= Login again on srv2 and untar the exports. --- tar -jxf ml-backup.tar.bz2 --- and then start to import everything --- #import the memberlist /var/lib/mailman/bin/list_members -i /home/mlb/mlbkup/member.out test-list #import the configuration /var/lib/mailman/bin/config_list -i /home/mlb/mlbkup/config.out test-list #cp the mbox file cp /home/mlb/mlbkup/test-list.mbox /var/lib/mailman/archives/private/test-list.mbox/test-list.mbox #rebuild the web archiv /var/lib/mailman/bin/arch test-list /var/lib/mailman/archives/private/test-list.mbox/test-list.mbox --- Step 5: ======= Login into the webfrontend on srv2 and change the Domain in the General options. Step 6: ======= Now you should sent a testmail and take a close look at the configuration so that everything fits your needs :) Under normal conditions everything should be fine and you can delete the old mailinglist :)