![](https://secure.gravatar.com/avatar/84dc7498ba20dec0638274722139dd4d.jpg?s=120&d=mm&r=g)
TGIF Mailman Gurus,
My current Mailman 2.1.12 server is lists.washlaw.edu and is running on a RedHat vm. I need to move it onto a new server which already has a new instance of Mailman 2.1.22 also on a RedHat vm. I already ran the ./configure command to be the same setup as the OLD server. I have searched the discussion list archives on the steps and am not fully understanding what needs to be done. Below are the steps I do know I need to take but then I am at a loss.
Post Postfix, Apache and Mialman on OLD server and NEW servers
Tar up the lists and archives from the mailman directory and copy the tar files to the new server
a. tar xvfx /usr/local/mailman/lists
b. tar xvfz /usr/local/mailman/archives
Untar the lists and archives onto NEW server
a. tar -xvf lists.tgz
b. tar -xvf archives.tgz
c. Run from /usr/local/mailman/bin ./check_perms -f
Run newaliases
Thanks, Jewel
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 09/23/2016 02:50 PM, Jewel Brueggeman-Makda wrote:
TGIF Mailman Gurus,
My current Mailman 2.1.12 server is lists.washlaw.edu and is running on a RedHat vm. I need to move it onto a new server which already has a new instance of Mailman 2.1.22 also on a RedHat vm. I already ran the ./configure command to be the same setup as the OLD server. I have searched the discussion list archives on the steps and am not fully understanding what needs to be done. Below are the steps I do know I need to take but then I am at a loss.
Post Postfix, Apache and Mialman on OLD server and NEW servers
Tar up the lists and archives from the mailman directory and copy the tar files to the new server
a. tar xvfx /usr/local/mailman/lists
should be 'tar cpvzf lists.tgz /usr/local/mailman/lists'
b. tar xvfz /usr/local/mailman/archives
should be 'tar cpvzf archives.tgz /usr/local/mailman/archives'
caveat: do not use the -h/--dereference option because archives/public contains only symlinks, and if it winds up with actual files, they don't get updated.
Untar the lists and archives onto NEW server
a. tar -xvf lists.tgz
b. tar -xvf archives.tgz
Or instead of 2 and 3, if the two servers can talk to each other, use 'rsync -a'.
c. Run from /usr/local/mailman/bin ./check_perms -f
Run newaliases
You don't need to run newaliases, but you do need to run Mailman's bin/genaliases.
Assuming the new server will ultimately be accessed via the old servers mail and web domain names, that's all you need.
If domain names will change, you will need to run fix_url after moving the lists. See <https://wiki.list.org/x/4030616>.
And, for the archives, in order to fix URLs to listinfo pages in the archives, the easiest thing is to just move the /usr/local/mailman/archives/private/LIST.mbox/LIST.mbox files and rebuild the pipermail archives with 'bin/arch --wipe'
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/84dc7498ba20dec0638274722139dd4d.jpg?s=120&d=mm&r=g)
Would it be best to copy the entire mailman directory to the new server or just the lists and archives?
Command issued on new server to copy data from old.
rsync -avr root@serverip:/usr/local/mailman /usr/local/mailman
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+jewel.makda=washburn.edu@python.org] On Behalf Of Mark Sapiro Sent: Saturday, September 24, 2016 11:36 AM To: mailman-users@python.org Subject: Re: [Mailman-Users] Migrating Mailman to New Server (Same Domain)
On 09/23/2016 02:50 PM, Jewel Brueggeman-Makda wrote:
TGIF Mailman Gurus,
My current Mailman 2.1.12 server is lists.washlaw.edu and is running on a RedHat vm. I need to move it onto a new server which already has a new instance of Mailman 2.1.22 also on a RedHat vm. I already ran the ./configure command to be the same setup as the OLD server. I have searched the discussion list archives on the steps and am not fully understanding what needs to be done. Below are the steps I do know I need to take but then I am at a loss.
Post Postfix, Apache and Mialman on OLD server and NEW servers
Tar up the lists and archives from the mailman directory and copy the tar files to the new server
a. tar xvfx /usr/local/mailman/lists
should be 'tar cpvzf lists.tgz /usr/local/mailman/lists'
b. tar xvfz /usr/local/mailman/archives
should be 'tar cpvzf archives.tgz /usr/local/mailman/archives'
caveat: do not use the -h/--dereference option because archives/public contains only symlinks, and if it winds up with actual files, they don't get updated.
Untar the lists and archives onto NEW server
a. tar -xvf lists.tgz
b. tar -xvf archives.tgz
Or instead of 2 and 3, if the two servers can talk to each other, use 'rsync -a'.
c. Run from /usr/local/mailman/bin ./check_perms -f
Run newaliases
You don't need to run newaliases, but you do need to run Mailman's bin/genaliases.
Assuming the new server will ultimately be accessed via the old servers mail and web domain names, that's all you need.
If domain names will change, you will need to run fix_url after moving the lists. See <https://wiki.list.org/x/4030616>.
And, for the archives, in order to fix URLs to listinfo pages in the archives, the easiest thing is to just move the /usr/local/mailman/archives/private/LIST.mbox/LIST.mbox files and rebuild the pipermail archives with 'bin/arch --wipe'
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/jewel.makda%40washburn...
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 10/24/2016 06:41 AM, Jewel Brueggeman-Makda wrote:
Would it be best to copy the entire mailman directory to the new server or just the lists and archives?
Command issued on new server to copy data from old. rsync -avr root@serverip:/usr/local/mailman /usr/local/mailman
That rsync should work if you want absolutely everything to be the same. There could be issues if the whole environment is not the same. E.g. if Mailman was configured --with-python=/usr/bin/python2.6 and the only Python on the new server is Python 2.7.
Also, there can be considerations if E.g. the user number for the 'mailman' user is different on the new server, but rsync usually handles that, at least if running as root on both ends.
That's why we suggest building a working Mailman on the new server and just moving lists and archives.
Aside: the 'r' in '-avr' is redundant as it is implied by '-a'.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/84dc7498ba20dec0638274722139dd4d.jpg?s=120&d=mm&r=g)
There are different versions of python, so I will stick to only copying the lists and archives directories. What about copying the data directory? I read that this was important too.
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+jewel.makda=washburn.edu@python.org] On Behalf Of Mark Sapiro Sent: Monday, October 24, 2016 10:37 AM To: mailman-users@python.org Subject: Re: [Mailman-Users] Migrating Mailman to New Server (Same Domain)
On 10/24/2016 06:41 AM, Jewel Brueggeman-Makda wrote:
Would it be best to copy the entire mailman directory to the new server or just the lists and archives?
Command issued on new server to copy data from old. rsync -avr root@serverip:/usr/local/mailman /usr/local/mailman
That rsync should work if you want absolutely everything to be the same. There could be issues if the whole environment is not the same. E.g. if Mailman was configured --with-python=/usr/bin/python2.6 and the only Python on the new server is Python 2.7.
Also, there can be considerations if E.g. the user number for the 'mailman' user is different on the new server, but rsync usually handles that, at least if running as root on both ends.
That's why we suggest building a working Mailman on the new server and just moving lists and archives.
Aside: the 'r' in '-avr' is redundant as it is implied by '-a'.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/jewel.makda%40washburn...
![](https://secure.gravatar.com/avatar/4d794bbd9de871f8264c8d2f48c7ef0f.jpg?s=120&d=mm&r=g)
Hi,
Le 24/10/2016 à 19:49, Jewel Brueggeman-Makda a écrit :
There are different versions of python, so I will stick to only copying the lists and archives directories.
I've recently moved a Mailman to a new server. I've do that, copy lists, archives and data directory.
<https://wiki.list.org/DOC/How%20do%20I%20move%20a%20list%20to%20a%20differen...>
-- Gérald Niel <gerald.niel@gegeweb.eu>
![](https://secure.gravatar.com/avatar/46f05b3d8ce25ad889788c9d34219727.jpg?s=120&d=mm&r=g)
On Mon, 2016-10-24 at 17:49 +0000, Jewel Brueggeman-Makda wrote:
There are different versions of python, so I will stick to only copying the lists and archives directories. What about copying the data directory? I read that this was important too.
The "list" and its per-list data are all contained, in modern installations of Mailman, in the files in /var/lib/mailman/lists. The files in /var/lib/mailman/data are per-site config. If you set up a working copy of Mailman to which to migrate your lists then this directory will already be properly populated.
So what you need to migrate, for each list, are these these two directories:
/var/lib/mailman/lists/<listname> /var/lib/mailman/archive/private/<listname>
If your list archives are to be public, you'll need to make a symbolic link for each list in /var/lib/mailman/archive/public to the list archive directory in /var/lib/mailman/archive/private
If you don't want your archives to be public, don't make this symbolic link.
--
Lindsay Haisley | "The first casualty when
FMP Computer Services | war comes is truth."
512-259-1190 |
http://www.fmp.com | -- Hiram W Johnson
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 10/24/2016 11:48 AM, Lindsay Haisley wrote:
The "list" and its per-list data are all contained, in modern installations of Mailman, in the files in /var/lib/mailman/lists. The files in /var/lib/mailman/data are per-site config. If you set up a working copy of Mailman to which to migrate your lists then this directory will already be properly populated.
Not entirely. If there are held messages, they are indexed in the lists/LISTNAME/request.pck files, but the messages themselves are in data/heldmsg* files.
If Mailman-Postfix integration is configured, the Postfix aliases and virtual mappings are in data/aliases* and data/virtual-mailman*, but it is best to regenerate these with bin/genaliases after moving the lists.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 10/24/2016 10:49 AM, Jewel Brueggeman-Makda wrote:
There are different versions of python, so I will stick to only copying the lists and archives directories. What about copying the data directory? I read that this was important too.
There are various things in data/. Some can be copied and some should not be.
adm.py and creator.py if any are the encrypted site password and list creator password respectively. These can be set if needed with bin/mmsitepass.
aliases* and virtual-mailman* can be copied, but it is better to regenerate them with bin/genaliases after moving the lists.
bounce-events* if it exists is a queue of current bounces for BounceRunner and if copied, won't be used.
heldmsg* are held messages. If you are copying the lists/LISTNAME/request.pck files these should be copied
last_mailman_version should not be copied if the Mailman versions are different. It should be the version of this Mailman.
master-qrunner.pid is the PID of the currently running Mailman and should not be copied.
sitelist.cfg is only an example config_list input file to more appropriately configure the site ('mailman') list. It will be the same in both places anyway.
The important things are the Postfix aliases and virtual mappings and it's better to regenerate those with genaliases, and the held messages which should be copied if there are any.
Bottom line: Copy the heldmsg* files Run genaliases Run mmsitepass if needed.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/46f05b3d8ce25ad889788c9d34219727.jpg?s=120&d=mm&r=g)
FWIW, I've done two complete migrations of a number of mailman (v2) lists as I've changed servers over the past few years. A couple of scripts I've used have worked perfectly in every case. In every migration, the basic Mailman installation is set up and running on the new server. Mailman versions, as long as we're talking about v2.x.x, are a no-nevermind.
The first, which runs on the old server is called tar_list.sh, is kept in /usr/local/sbin and is run as root:
#!/bin/sh
if [ "$1" = "" ]; then
echo 'Usage: tar_list.sh <listname>'
exit
fi
if [ ! -e /var/lib/mailman/lists/$1 ]; then
echo "$1: No such list!"
exit
fi
mkdir /tmp/$1
cd /var/lib/mailman/lists/
echo Creating $1_list.tar.gz ....
tar -czvf $1_list.tar.gz $1
mv $1_list.tar.gz /tmp/$1
cd /var/lib/mailman/archives/private/
echo Creating $1_archive.tar.gz ....
tar -czvf $1_archive.tar.gz $1
mv $1_archive.tar.gz /tmp/$1
echo Creating $1_archive_mbox.tar.gz ....
tar -czvf $1_archive_mbox.tar.gz $1.mbox
mv $1_archive_mbox.tar.gz /tmp/$1
if [ -L /var/lib/mailman/archives/public/$1 ]; then
touch /tmp/$1/$1_archive_is_public
fi
The second script, on the new server, lives in ~mailman/bin and is run as the mailman user (which, on my server, has a real, usable shell):
#!/bin/sh
if [ "$2" = "" ]; then
echo 'Usage: untar_list.sh <server> <listname>'
exit
fi
cd ~/tmp/
echo "Give root password on remote system ..."
scp root@$1:/tmp/$2/* .
cd /var/lib/mailman/lists/
echo ""
echo "Creating list $2 ..."
tar -xzvpf ~/tmp/$2_list.tar.gz
cd /var/lib/mailman/archives/private/
echo ""
echo "Creating archive for $2 ..."
tar --same-owner -xzvpf ~/tmp/$2_archive.tar.gz
echo "Creating archive mbox for $1 ..."
tar --same-owner -xzvpf ~/tmp/$2_archive_mbox.tar.gz
if [ -e ~/tmp/$2_archive_is_public ]; then
ln -s /var/lib/mailman/archives/private/$2 /var/lib/mailman/archives/public/$2
fi
echo""
echo "If no errors, delete files in ~/tmp and delete /tmp/$2 directory on remote system"
This does require (and this may be a show-stopper for some) that the mailman user on the new system be able to ssh to the old server as root. I'm sure there's an easy workaround for this, but since I've always has full root access to my servers and run connections between servers via encrypted VPNs, it's been simply a matter of modifying the sshd_config file to allow this.
On Mon, 2016-10-24 at 13:41 +0000, Jewel Brueggeman-Makda wrote:
Would it be best to copy the entire mailman directory to the new server or just the lists and archives? Command issued on new server to copy data from old. rsync -avr root@serverip:/usr/local/mailman /usr/local/mailman
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+jewel.makda=washbur n.edu@python.org] On Behalf Of Mark Sapiro Sent: Saturday, September 24, 2016 11:36 AM To: mailman-users@python.org Subject: Re: [Mailman-Users] Migrating Mailman to New Server (Same Domain)
On 09/23/2016 02:50 PM, Jewel Brueggeman-Makda wrote:
TGIF Mailman Gurus,
My current Mailman 2.1.12 server is lists.washlaw.edu and is running on a RedHat vm. I need to move it onto a new server which already has a new instance of Mailman 2.1.22 also on a RedHat vm. I already ran the ./configure command to be the same setup as the OLD server. I have searched the discussion list archives on the steps and am not fully understanding what needs to be done. Below are the steps I do know I need to take but then I am at a loss.
1. Post Postfix, Apache and Mialman on OLD server and NEW servers
2. Tar up the lists and archives from the mailman directory and copy the tar files to the new server
a. tar xvfx /usr/local/mailman/lists
should be 'tar cpvzf lists.tgz /usr/local/mailman/lists'
b. tar xvfz /usr/local/mailman/archives
should be 'tar cpvzf archives.tgz /usr/local/mailman/archives'
caveat: do not use the -h/--dereference option because archives/public contains only symlinks, and if it winds up with actual files, they don't get updated.
3. Untar the lists and archives onto NEW server
a. tar -xvf lists.tgz
b. tar -xvf archives.tgz
Or instead of 2 and 3, if the two servers can talk to each other, use 'rsync -a'.
c. Run from /usr/local/mailman/bin ./check_perms -f
4. Run newaliases
You don't need to run newaliases, but you do need to run Mailman's bin/genaliases.
Assuming the new server will ultimately be accessed via the old servers mail and web domain names, that's all you need.
If domain names will change, you will need to run fix_url after moving the lists. See <https://wiki.list.org/x/4030616>.
And, for the archives, in order to fix URLs to listinfo pages in the archives, the easiest thing is to just move the /usr/local/mailman/archives/private/LIST.mbox/LIST.mbox files and rebuild the pipermail archives with 'bin/arch --wipe'
--
Lindsay Haisley | "The first casualty when
FMP Computer Services | war comes is truth."
512-259-1190 |
http://www.fmp.com | -- Hiram W Johnson
![](https://secure.gravatar.com/avatar/987f59c713c470a1bd79f862bf95b919.jpg?s=120&d=mm&r=g)
Am 24.10.2016 um 22:41 schrieb Jewel Brueggeman-Makda <jewel.brueggeman-makda@washburn.edu>:
Would it be best to copy the entire mailman directory to the new server or just the lists and archives? Command issued on new server to copy data from old. rsync -avr root@serverip:/usr/local/mailman /usr/local/mailman
what worked for me, was copying/syncing all mailman directories to the new volume and run an update on mailman by downloading the last version and recompile it with the same settings of config as before. Then I just checked the settings file. Without that mailman wouldn’t start. cheers Matthias
participants (5)
-
Gérald Niel
-
Jewel Brueggeman-Makda
-
Lindsay Haisley
-
Mark Sapiro
-
Matthias Schmidt