Excluding archives from a mailman3web database backup
Hi,
In doing regular database dumps for backup purposes I note that by far the largest quantity of data is HyperKitty's archives.
We already keep external archives using the prototype archiver (and some rotation of Maildirs), because we see value in having a simple archive outside of HyperKitty. So, I'd rather not be backing up this data twice. In event of disaster I'd like to be able to do a maildir2mbox on what prototype has written and re-import the resulting mbox file.
Is that a realistic proposal? i.e. does a typical maildir2mbox conversion script generate something that "manage.py hyperkitty_import" would be happy with when run on prototype's maildir?
If so, is it safe to just exclude every table starting with "hyperkitty_" from the database backup of mailman3web? Dumping only the schema for these, I mean, so that an import would restore empty tables.
Thanks, Andy
On 6/23/22 17:38, Andy Smith wrote:
Is that a realistic proposal? i.e. does a typical maildir2mbox conversion script generate something that "manage.py hyperkitty_import" would be happy with when run on prototype's maildir?
Yes.
If so, is it safe to just exclude every table starting with "hyperkitty_" from the database backup of mailman3web? Dumping only the schema for these, I mean, so that an import would restore empty tables.
That should be safe. The hyperkitty_import job should populate the tables as necessary. You will lose things like favorites, last views, tags and votes, but that may not be important.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
On Thu, Jun 23, 2022 at 09:43:10PM -0700, Mark Sapiro wrote:
On 6/23/22 17:38, Andy Smith wrote:
is it safe to just exclude every table starting with "hyperkitty_" from the database backup of mailman3web? Dumping only the schema for these, I mean, so that an import would restore empty tables.
That should be safe. The hyperkitty_import job should populate the tables as necessary. You will lose things like favorites, last views, tags and votes, but that may not be important.
Thanks.
In case it's useful for anyone, here is a script I came up with for this:
https://gist.github.com/grifferz/6c6033c3067db5883c6413f653705691#file-mailman3-mysqldump-bash=
Cheers, Andy
participants (2)
-
Andy Smith
-
Mark Sapiro