[Mailman-Users] How to backup datas?

Harald Meland Harald.Meland at usit.uio.no
Mon Feb 15 22:55:46 CET 1999

[Alex Yu]

> Hello,
> Can anyone teach me how to backup datas?

To make *completely* sure you have consistent backups of Mailman, you
need to make sure that while you are collecting in the data to put on
your backup tapes (or whatever), that data set isn't changing.  IOW,
you need to lock Mailman from being changed until your backup is

To get a grip on what kind of locking Mailman supports, this could be
a start:

  $ find Mailman -name \*.py | xargs grep -i 'def[^(]*lock'
  Mailman/Archiver/HyperDatabase.py:    def lock(self):
  Mailman/Archiver/HyperDatabase.py:    def unlock(self):
  Mailman/Archiver/HyperArch.py:    def GetArchLock(self):
  Mailman/Archiver/HyperArch.py:    def DropArchLock(self):
  Mailman/Pending.py:    def __assert_lock(self, timeout):
  Mailman/Pending.py:    def __release_lock(self):
  Mailman/flock.py:    def lock(self, timeout = 0):
  Mailman/flock.py:    def unlock(self):
  Mailman/flock.py:    def locked(self):
  Mailman/MailList.py:    def Locked(self):
  Mailman/MailList.py:    def Lock(self):
  Mailman/MailList.py:    def Unlock(self):

For most people, making the backup when Mailman isn't too busy should
be sufficient (even if this in theory could generate inconsistent

> I know how to write script, but I need to know how mailman stores
> the datas...

A script for making a consistent snapshot of a Mailman installation
would be nice to have.  However, I don't think there are any
"shortcuts" for someone just wanting to make a quick script -- nothing
can substitute real knowledge of how Mailman works.

The source is there for anyone to read, so getting the needed
knowledge isn't _that_ hard.

> And can I restore it easily?

Any Mailman resource being restored from backup should preferably be
locked as appropriate first, in order to insure that some running
Mailman process doesn't overwrite the just-restored resource whenever
the process decides it wants to save state.

Or one can take the easy path and don't care about these potential
backup/restore "race conditions", and hope that they won't bite you
when you really *need* the backup or restore to work flawlessly.
Hello, Murphy. :)


More information about the Mailman-Users mailing list