My only problem with this is that it still leaves config.db for each list in
a binary format.  So, I can not simply place it on a Linux platform and move
the list from a FreeBSD platform which was running a different version of
Python and a different version of Berkley DB.  So -- I need a script to
extract the information from these DB files and to be able to reload it
again.

Essentially, it would be nice to have a script that was like this:

% mm_bkup <listname> <filename>
% mm_restore <listname> <filename>

The <filename> would contain the archives, members, passwords, member
settings and all list setting.  It would also be platform independent, so it
wouldn't matter what version of Python, Berkley DB or the operation system
mailman is running on.

I don't know Python (although I do know C++ and Java quite well), and I
really don't want to learn it for this singular use.  I was hoping somebody
had already written such a script.

Thanks in advance,

Tom Veldhouse
[EMAIL PROTECTED]

----- Original Message -----
From: "J C Lawrence" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 11:34 PM
Subject: [Mailman-Users] Backing up Mailman list installations


>
> <<Reply-To: set>>
>
> A moderately frequent request on these lists has been, "How can I
> back up my Mailman lists/membership/etc?"  I happened to be in the
> area today touching up the scripts I use.  Please feel free to adapt
> freely.
>
> Note: You'll need to have a reasonably recent version of nmh
> installed as the scripts rely on the MH tools to build a MIME
> message:
>
>   http://www.mhost.com/nmh/
>
> The scripts:
>
>   ~/bin/mimemail:
>     --<cut>--
>     #!/bin/bash
>     #set -x
>
>     subject=$1
>     file=$2
>     addr=$3
>
>     echo "To: ${addr}
>     From: nobody
>     Subject: ${subject}
>
>     #application/octet-stream [${subject}] ${file}
>
>     " | /usr/bin/mh/mhbuild - > /tmp/mimemail.tmp.${$}
>     /usr/lib/mh/post -verbose -watch /tmp/mimemail.tmp.${$}
>     rm /tmp/mimemail.tmp.${$}
>     --<cut>--
>
>   ~/bin/mailman.backup
>     --<cut>--
>     #!/bin/bash
>     #set -x
>
>     datestr=`date +%Y%m%d`
>     host=`hostname -f`
>     file=mailman.lists.${datestr}.tar.gz
>     filepath=~/backups/${file}
>     sendto="root"
>
>     cd /var/lib/mailman
>     tar zcf ${filepath} lists
>     cd ~/backups
>     mimemail ${file} ${filepath} ${sendto}
>     #rm ${file}
>     --<cut>-
>
> Yeah, there are some hard coded paths in there.  Sue me.  I never
> said they were pretty, merely that they worked.  Brief explanation:
>
>   mimemail takes three arguments: the Subject: of the message its
>   going to send, the file it is going to send, and the address it is
>   going to send it to.  mimemail depends on the nmh tools to build
>   the MIME message.
>
>   mailman.backup takes no arguments.  It creates a compressed
>   tarball of ~mailman/lists in the file
>   ~/backups/mailman.lists.YYMMDD.tar.gz
>
>     eg: mailman.lists.20011128.tar.gz
>
>   And then uses mimemail to send that file to root@localhost
>   (edit/change if you want) before deleting it.
>
> To use drop them in a cronjob something like:
>
>   0 6 * * 0 /home/archiver/bin/mailman.backup
>
> A sample execution should look something like:
>
>   $ ./mailman.backup
>    -- Posting for All Recipients --
>     -- Local Recipients --
>     root: address ok
>    -- Recipient Copies Posted --
>   Message Processed
>
> The result will be that every time the cronjob runs it will send you
> (in this case [EMAIL PROTECTED]) a message looking something like:
>
>   Subject: mailman.lists.20011128.tar.gz
>   From: [EMAIL PROTECTED]
>   Date: Wed, 28 Nov 2001 21:12:55 -0800
>   To: [EMAIL PROTECTED]
>
>   <MIME attachment application/octet-stream>
>
> Where the MIME attachment is the tarball constructed by
> ~/bin/mailman.backup.  Edit the value of sendto in mailman.backup if
> you want them going somewhere else.
>
> I've added this to FAQ at:
>
>   http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.006.htp
>
> --
> J C Lawrence
> ---------(*)                Satan, oscillate my metallic sonatas.
> [EMAIL PROTECTED]               He lived as a devil, eh?
> http://www.kanga.nu/~claw/  Evil is a name of a foeman, as I live.
>
> ------------------------------------------------------
> Mailman-Users maillist  -  [EMAIL PROTECTED]
> http://mail.python.org/mailman/listinfo/mailman-users
>


------------------------------------------------------
Mailman-Users maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users

Reply via email to