⇤ ← Revision 1 as of 2008-05-28 20:28:03
Size: 3449
Comment:
|
Size: 3309
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
#pragma page-filename DOC/versions/4292706 | #pragma page-filename DOC/versions/5603446 |
Line 5: | Line 5: |
See also FAQ 4.18 at <[[http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.018.htp]]>. | See also FAQ 4.18 at [[../How do I backup my lists and their configurations-membership rosters?|How do I backup my lists and their configurations-membership rosters?]] |
Line 18: | Line 18: |
~/bin/mimemail: --<cut>-- #!/bin/bash |
#!/bin/bash |
Line 22: | Line 20: |
}}} | |
Line 24: | Line 21: |
{{{ |
|
Line 29: | Line 24: |
}}} | |
Line 31: | Line 25: |
{{{ |
|
Line 36: | Line 28: |
}}} | |
Line 38: | Line 29: |
#application/octet-stream [${subject}] ${file} | |
Line 39: | Line 31: |
{{{ #application/octet-stream [${subject}] ${file} }}} {{{ |
|
Line 53: | Line 39: |
~/bin/mailman.backup --<cut>-- #!/bin/bash |
#!/bin/bash |
Line 57: | Line 41: |
}}} | |
Line 59: | Line 42: |
{{{ |
|
Line 66: | Line 47: |
}}} | |
Line 68: | Line 48: |
{{{ |
|
Line 92: | Line 70: |
}}} | |
Line 94: | Line 71: |
eg: mailman.lists.20011128.tar.gz | |
Line 95: | Line 73: |
{{{ eg: mailman.lists.20011128.tar.gz }}} {{{ |
|
Line 129: | Line 101: |
}}} {{{ <MIME attachment application/octet-stream> |
<MIME attachment application/octet-stream> |
4.6. How can I backup my Mailman lists/membership/etc on a regular basis?
You should of course have regular, reliable, and tested site backup procedures for all your data, not just your Mailman lists. However, there are advantages to making and/or distributing backups of your list configurations in other and possibly more flexible and frequent manners than your site backup procedures.
See also FAQ 4.18 at How do I backup my lists and their configurations-membership rosters?
J C Lawrence <claw@kanga.nu> uses the following approach:
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.nongnu.org/nmh/
The scripts:
#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>--
#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 root@host.dom) a message looking something like:
Subject: mailman.lists.20011128.tar.gz From: nobody@kanga.nu Date: Wed, 28 Nov 2001 21:12:55 -0800 To: root@kanga.nu <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.
Last changed on Tue Jan 9 00:05:07 2007 by Brad Knowles Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.