Hi folks. Some time ago, I set up mm3 and have been running a bunch of lists on it with great success. I was a long-time mm2 user, and while the differences are significant, I'm glad I made the switch.
However, in what seems to have been a moment of insanity in retrospect, I installed mm3 from my OS' package repository.
Yeah, I know, that was dumb. Now I'd like to migrate to a new server, and I'd like to install mm3 in the normal way.
Is there a way that I can "dump" the configuration from an existing mailman3 server, and "import" it into a new instance? I'd really like to avoid re-doing all of the configuration, etc, as there are quite a few lists and everything is set up pretty much the way I want it.
I would appreciate any advice from this learned group.
Thanks,
-Dave
-- Dave McGuire, AK4HZ New Kensington, PA
On Fri, Jul 30, 2021, at 12:06 PM, Dave McGuire wrote:
Hi folks. Some time ago, I set up mm3 and have been running a bunch of lists on it with great success. I was a long-time mm2 user, and while the differences are significant, I'm glad I made the switch.
However, in what seems to have been a moment of insanity in retrospect, I installed mm3 from my OS' package repository.
Yeah, I know, that was dumb. Now I'd like to migrate to a new server, and I'd like to install mm3 in the normal way.
Is there a way that I can "dump" the configuration from an existing mailman3 server, and "import" it into a new instance? I'd really like to avoid re-doing all of the configuration, etc, as there are quite a few lists and everything is set up pretty much the way I want it.
You can copy the database from your old install to the new install
using the database native tools (or just point the new install to the
same old database if that is a possibility). Mailman Core will upgrade the
database schema when it first starts to the latest version's expected
schema. For web-components, you'd have to manually run the django's
migrate
command to upgrade the database. The exact migrate
command depends on how you install the new one (mailman-web or
django-admin --settings settings).
I'd also say you should avoid updating database versions in this process because that would just add another variable to the process.
I would appreciate any advice from this learned group.
Thanks, -Dave
-- Dave McGuire, AK4HZ New Kensington, PA
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
On 7/30/21 3:43 PM, Abhilash Raj wrote:
Hi folks. Some time ago, I set up mm3 and have been running a bunch
of lists on it with great success. I was a long-time mm2 user, and while the differences are significant, I'm glad I made the switch.
However, in what seems to have been a moment of insanity in
retrospect, I installed mm3 from my OS' package repository.
Yeah, I know, that was dumb. Now I'd like to migrate to a new
server, and I'd like to install mm3 in the normal way.
Is there a way that I can "dump" the configuration from an existing
mailman3 server, and "import" it into a new instance? I'd really like to avoid re-doing all of the configuration, etc, as there are quite a few lists and everything is set up pretty much the way I want it.
You can copy the database from your old install to the new install using the database native tools (or just point the new install to the same old database if that is a possibility). Mailman Core will upgrade the database schema when it first starts to the latest version's expected schema. For web-components, you'd have to manually run the django's
migrate
command to upgrade the database. The exact migrate command depends on how you install the new one (mailman-web or django-admin --settings settings).
Ok. I guess first I've got to figure out where the database lives. I've not been hacking on mm3, just using it.
I'd also say you should avoid updating database versions in this process because that would just add another variable to the process.
Sounds reasonable.
Thank you, I appreciate the advice.
-Dave
-- Dave McGuire, AK4HZ New Kensington, PA
On 7/30/21 1:07 PM, Dave McGuire wrote:
Ok. I guess first I've got to figure out where the database lives. I've not been hacking on mm3, just using it.
What's in the [database] section of your mailman.cfg? and the DATABASES definition of your Django local settings.
The database is managed by some database manager. If it is Postgres or MySQL/MariaDB, there are actual database servers. If it is the default SQLite, it's probably Mailman's var/data/mailman.db
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 7/30/21 4:18 PM, Mark Sapiro wrote:
Ok. I guess first I've got to figure out where the database lives. I've not been hacking on mm3, just using it.
What's in the [database] section of your mailman.cfg? and the DATABASES definition of your Django local settings.
The database is managed by some database manager. If it is Postgres or MySQL/MariaDB, there are actual database servers. If it is the default SQLite, it's probably Mailman's var/data/mailman.db
Ok, I will dig into it in the coming days. (and I will take a lot of notes this time) Thank you for the pointers. I'll come back on this if I need further help figuring it out.
As always, I appreciate your time.
Thanks,
-Dave
-- Dave McGuire, AK4HZ New Kensington, PA
On 7/30/21 12:06 PM, Dave McGuire wrote:
Is there a way that I can "dump" the configuration from an existing mailman3 server, and "import" it into a new instance? I'd really like to avoid re-doing all of the configuration, etc, as there are quite a few lists and everything is set up pretty much the way I want it.
If you use the same database manager it should be no problem to get a
dump of the existing Mailman database to load into the new instance, or
if these are on the same server, just point the new instance to the
existing database. In either case, the database should be loaded and the
Django commands migrate
, collectstatic,
compressand
compilemessages` run[1] before starting Mailman services. Mailman core
will run any necessary updates to its database upon startup.
You may also need to rebuild the HyperKitty search index with the
update_index
Django command, but you may be able to use the existing
one if the search engine is the same.
[1] See https://docs.mailman3.org/en/latest/install/virtualenv.html?highlight=collec... et seq.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 7/30/21 3:48 PM, Mark Sapiro wrote:
Is there a way that I can "dump" the configuration from an existing mailman3 server, and "import" it into a new instance? I'd really like to avoid re-doing all of the configuration, etc, as there are quite a few lists and everything is set up pretty much the way I want it.
If you use the same database manager it should be no problem to get a dump of the existing Mailman database to load into the new instance, or if these are on the same server, just point the new instance to the existing database. In either case, the database should be loaded and the Django commands
migrate
, collectstatic,
compressand
compilemessages` run[1] before starting Mailman services. Mailman core will run any necessary updates to its database upon startup.You may also need to rebuild the HyperKitty search index with the
update_index
Django command, but you may be able to use the existing one if the search engine is the same.[1] See https://docs.mailman3.org/en/latest/install/virtualenv.html?highlight=collec... et seq.
Understood. I am not at all fluent in django interactions (I'm still not entirely sure of what django actually *is*) so I have some reading to do. Any pointers on "django wrangling for n00bs" would be great. As I mentioned, I've not been hacking on mm3, just using it. I'm an accomplished programmer, but embedded C and assembler are a few galaxies away from python and web services!
-Dave
-- Dave McGuire, AK4HZ New Kensington, PA
On 7/30/21 1:10 PM, Dave McGuire wrote:
I am not at all fluent in django interactions (I'm still not entirely sure of what django actually *is*) so I have some reading to do. Any pointers on "django wrangling for n00bs" would be great. As I mentioned, I've not been hacking on mm3, just using it. I'm an accomplished programmer, but embedded C and assembler are a few galaxies away from python and web services!
Django is a Python based web framework. It is the framework used to support HyperKitty and Postorius. To learn more, start at https://www.djangoproject.com/
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 7/30/21 4:25 PM, Mark Sapiro wrote:
I am not at all fluent in django interactions (I'm still not entirely sure of what django actually *is*) so I have some reading to do. Any pointers on "django wrangling for n00bs" would be great. As I mentioned, I've not been hacking on mm3, just using it. I'm an accomplished programmer, but embedded C and assembler are a few galaxies away from python and web services!
Django is a Python based web framework. It is the framework used to support HyperKitty and Postorius. To learn more, start at https://www.djangoproject.com/
I'll get to reading. Thanks!
-Dave
-- Dave McGuire, AK4HZ New Kensington, PA
Dave McGuire writes:
I'll get to reading. Thanks!
It's not clear to me that you need to do a ton of Django wrangling, though. The migrations are run automatically when you issue the commands to upgrade, and are in the RDBMS backend, not the Django ORM. The work you have to do "by hand" (DB dump/restore) is also on the backend RDBMS end.
You may have to do some fiddling with Django modules, especially middleware, but that's all Mailman-specific and reasonably well explained in our docs. (That's my opinion, and YMMV, so don't hesitate to ask!)
Steve
participants (4)
-
Abhilash Raj
-
Dave McGuire
-
Mark Sapiro
-
Stephen J. Turnbull