On Tue, 2013-11-05 at 13:14 -0600, c cc wrote:
> Mark,
> 
> It seems like /etc/init.d/mailman and /etc/rc.d/mailman both are runing
> /usr/lib/mailman/bin/mailmanctl, as you can you below:
> 
> MAILMANHOME=/usr/lib/mailman
> MAILMANCTL=$MAILMANHOME/bin/mailmanctl
> 
> Here how I moved my lists over to the new server:

FWIW, here are the two scripts I use to move Mailman accounts, with
their archives, from one computer to another.  I've never had a single
problem when using them and have moved a lot of lists with them.

The first script creates an gzip archive of the list in /tmp, plus a
marker file indicating whether or not the list's posting archive is
public or private.  It's called /usr/local/sbin/tar_list.sh and gets run
by root to tar up the list's files.

        #!/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 lives in ~mailman/bin on the receiving system and is
called untar_list.sh.  It gets run by the mailman user, which must have
a login shell, even if only temporarily.  If you don't have the root
password on the remote system, or if ssh is forbidden for root, then
change the account name to that of an unprivileged user on line 8 and 9.

        #!/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 -xzvpf ~/tmp/$2_archive.tar.gz
        
        echo "Creating archive mbox for $1 ..."
        tar -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"
        
        

-- 
Lindsay Haisley       | "We have met the enemy and he is us."
FMP Computer Services |
512-259-1190          |          -- Pogo
http://www.fmp.com    |

------------------------------------------------------
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/archive%40jab.org

Reply via email to