On 12/8/23 08:01, Jens Günther wrote:
This is a nice collection of the configuration of a certain list. Does anybody know how I would get this data back to the newly created list in the second working mm3-instance? Shouldn't it be possible via POST command? I thought of something like:
curl -u restadmin:restpass -d @short.domain -H "Content-Type: application/json" localhost:8001/3.1/lists/&short.&domain/config
But it returns {"title": "405 Method Not Allowed"} and I don't know where to look in the docs, since it shows almost always a way through mailman shell.
You need a PUT command, not POST. Try the above with -X PUT
.
## Members, moderators, owners
To export all members I normally run within mm-core-container as user mailman the following command:
mailman members &short.&domain > &short.txt
To fill them back in, it can be done in Postorius (or is there a way through API?).
You can use Postorius -> Mass operations -> Mass subscribe to add the members, but you can't do that for owners and moderators. Also you lose information about the members such as Delivery status, Delivery mode and other user settings.
What I would love to know is how to get out Owners of the corresponding lists and reimport them in the new one (which will be the same at the end :-D but different instance).
You can use the --role option with mailman members
to get owners and
moderators, but short of a custom script, you have to add them manually.
## registered users
This part is somehow tricky, since I have no clue how to do it. Some of the mailinglist-admins don't want to bother their list-owners again with registering newly on the other system. Is there a way to export all users (I think I found them in the DB in the table auth_users, somehow in combination with account_emailaddress) and get them over to the new instance (actually I just need part of them, but that's another question that I might solve lateron on my own).
Maybe the answer is already here: https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/u... -> but can somebody help to get this working (import/export)?
That is not the answer. Those are Mailman core users, not Django (web login) users. You need to get the relevant entries from the auth_users and account_emailaddress tables and add them to the new DB.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan