Home | FAQ | Manual | Ezmlm Manual Pages | Qmail Manual Pages | Readme | Upgrade | Downgrade

Archive Management - ezmlm and ezmlm-idx Manual

Previous: Making a List Moderated, Up: Owner's Manual


3.18 Archive Management

The archive is a set of files, one per message, kept in DIR/archive/. The directory DIR/archive/0/ contains messages 1-99, DIR/archive/1/ messages 100-199, and so on. The files within the directories are named by the last 2 digits of the message number, ‘01-99’ for DIR/archive/0/ and ‘00-99’ for others. In addition, each set of messages is indexed(*) in the file index stored with the corresponding message files.

3.18.1 Backing up and removing parts of the archive

With time, the archive grows and it may become necessary to remove some messages. When the list is at message ‘12301’ one may wish to remove messages 1-9999 from the archive. Easiest is to remove messages as entire subdirectories. For the above, do:

     % tar -cvf listarch1_9999.tar DIR/archive/? DIR/archive/1?
     % gzip listarch1_9999.tar
     % rm -rf DIR/archive/? DIR/archive/1?

The ‘DIR’ here is the list directory. (You may be able to combine the ‘gzip’ action with the ‘tar’ command by adding the ‘-z’ switch.)

Save listarch1_9999.tar.gz in a safe place. (Usually, you would choose a better name for the backup “tar” file). Nothing else needs to be done. If instead you remove individual messages and use ezmlm-idx, it is useful, but not necessary to do:

     % ezmlm-idx DIR

to re-index the archive. (For a large archive on a slow machine, this command may take a few minutes.)

3.18.2 Restoring parts of the archive

To restore the messages saved in the example above to the archive, simply:

     % gunzip listarch1_9999.tar.gz
     % tar -xvf listarcg1_9999.tar.gz
     % ezmlm-idx DIR

Re-indexing the archive (as shown) is recommended, since the format for the index file may have been changed if ezmlm was upgraded since the backup.