On 5/26/19 7:00 AM, Alain Kohli wrote:
I have noticed that especially the var/messages directory has a rather considerable size compared to the rest. What exactly is this for and what would be the consequences if that was lost?
When a message is held for moderator approval, a pickle of the message is stored in the var/messages directory and an entry pointing to it is made in the message table in the database. An entry is also made in the list's pending requests. These are required so the held message can be handled.
There is an issue in that when these messages are handled these aren't removed. See <https://gitlab.com/mailman/mailman/issues/257>.
Thus, most of what's in the var/messages directory is old, but there are also currently held messages there that would be lost.
You could periodically remove older messages, but this would leave entries pointing to them in the message table in the database which could cause errors but probably not.
The real solution is a fix for <https://gitlab.com/mailman/mailman/issues/257>.
And more generally, would not backing up var/ at all only result in the loss of some short term data (e.g. messages that are held or currently processed) or would long term data also be lost? Or in other words, what exactly would be non-recoverable if that isn't backed up?
That depends in part on what your backend database is. If it's SQLite, the database is probably in the var/data directory. If not, you need to be backing up the MySQL or postgreSQL mailman database.
var/archives contains archived messages for the 'prototype' archiver and messages that are queued for hyperkitty.
var/cache contains a cache of recently used templates.
var/data may contain a SQLite database and may contain Postfix mappings.
The Postfix mappings can be regenerated by the mailman aliases
command.
var/etc may contain your mailman.cfg if you don't point to a different one.
var/lists contains accumulated messages for the next digest for your lists
var/locks contains locks and should probably not be restored from a backup
var/logs contains Mailman's logs.
var/messages is discussed above.
var/queue contains Mailman's current queues. Except for 'shunt' this is all things currently in process.
var/templates may contain custom templates.
Also, I didn't mention it before, but your Django settings.py and settings_local.py should also be backed up.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan