Restoring manually backed-up archives into cPanel installation?

I'm trying to migrate a group of Mailman lists onto a new shared hosting provider. I do not have direct access to the original system; the sysadmin there has given me a full tarball of the mailman directory, including the archives/, data/, and lists/ subdirectories.
The new hosting provider, to which I do have command-line access via SSH, uses Mailman through a cPanel installation. There's no mailman directory currently, and cPanel itself doesn't have any options for migration. I e-mailed the support group to ask where to put it, and they said that you can only restore a backup that is itself made with cPanel into a cPanel environment; the cPanel version of mailman is different and won't accept backups made manually.
Is this true? I've Googled what I can, but haven't found anything that addresses this. If I can't restore the list archives, I'll need to find a different hosting provider, and it hasn't been easy to find one that meets my otherwise very simple needs.

-----Original Message----- From: Mailman-Users <mailman-users- bounces+brian=emwd.com@python.org> On Behalf Of Jesse Sheidlower Sent: Monday, January 14, 2019 7:03 AM To: mailman-users@python.org Subject: [Mailman-Users] Restoring manually backed-up archives into cPanel installation?
I'm trying to migrate a group of Mailman lists onto a new shared hosting provider. I do not have direct access to the original system; the sysadmin there has given me a full tarball of the mailman directory, including the archives/, data/, and lists/ subdirectories.
The new hosting provider, to which I do have command-line access via SSH, uses Mailman through a cPanel installation. There's no mailman directory currently, and cPanel itself doesn't have any options for migration. I e-mailed the support group to ask where to put it, and they said that you can only restore a backup that is itself made with cPanel into a cPanel environment; the cPanel version of mailman is different and won't accept backups made manually.
Is this true? I've Googled what I can, but haven't found anything that addresses this. If I can't restore the list archives, I'll need to find a different hosting provider, and it hasn't been easy to find one that meets my otherwise very simple needs.
Hi Jesse,
Those files need to go into the backend of the server which is beyond the reach of a cPanel shared hosting account. The server admin would have to do that for you. As long as the backup of the files are version 2.1.* they should migrate fine. Contact me off list if you can't get this resolved.
Brian Carpenter Mailmanhost.com :^)

On 1/14/19 4:02 AM, Jesse Sheidlower wrote:
I'm trying to migrate a group of Mailman lists onto a new shared hosting provider. I do not have direct access to the original system; the sysadmin there has given me a full tarball of the mailman directory, including the archives/, data/, and lists/ subdirectories.
Good.
The new hosting provider, to which I do have command-line access via SSH, uses Mailman through a cPanel installation. There's no mailman directory currently, and cPanel itself doesn't have any options for migration. I e-mailed the support group to ask where to put it, and they said that you can only restore a backup that is itself made with cPanel into a cPanel environment; the cPanel version of mailman is different and won't accept backups made manually.
Is this true?
Yes and No.
There is some info at <https://wiki.list.org/DOC/Mailman%20and%20CPanel>. The most important thing is that the 'mailman' directory in cPanel is at /usr/local/cpanel/3rdparty/mailman.
Importing archives is not a problem. Importing lists is an issue because of cPanel's appending the domain to the internal listname, so you can't just drop a mailman/lists/LISTNAME/config.pck into cPanel, even if yo put it in /usr/local/cpanel/3rdparty/mailman/lists/LISTNAME_DOMAIN/config.pck, because the internal name in the config.pck is wrong.
I think if you have a way to import the list membership, the way to proceed is to create the lists in cPanel and then add the members. Extracting the members from your existing mailman/lists/LISTNAME/config.pck file is difficult without a mailman installation, but you might be able to just put a config.pck in /usr/local/cpanel/3rdparty/mailman/lists/XXX/config.pck and run /usr/local/cpanel/3rdparty/mailman/bin/list_members on the XXX list to get files of regular members, plain digest members and mime digest members which you can import to the real list via /usr/local/cpanel/3rdparty/mailman/bin/add_members. Run those commands with the --help option for details on options.
For the archives, you should be able to import them into a cPanel list with the command '/usr/local/cpanel/3rdparty/mailman/bin/arch LISTNAME_DOMAIN /path/to/old/archives/private/LISTNAME.mbox/LISTNAME.mbox'
Actually, you might be able to create a list in cPanel and then just replace its lists/LISTNAME_DOMAIN/config.pck with the one from the backup and then use /usr/local/cpanel/3rdparty/mailman/bin/withlist to 'fix' attributes like _internal_name, host_name and web_page_url, but this probably requires some knowledge of Mailman internals and trial and error.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Mon, Jan 14, 2019 at 08:20:21AM -0800, Mark Sapiro wrote:
On 1/14/19 4:02 AM, Jesse Sheidlower wrote:
I'm trying to migrate a group of Mailman lists onto a new shared hosting provider. I do not have direct access to the original system; the sysadmin there has given me a full tarball of the mailman directory, including the archives/, data/, and lists/ subdirectories.
Yes and No.
There is some info at <https://wiki.list.org/DOC/Mailman%20and%20CPanel>. The most important thing is that the 'mailman' directory in cPanel is at /usr/local/cpanel/3rdparty/mailman.
Importing archives is not a problem. Importing lists is an issue because of cPanel's appending the domain to the internal listname, so you can't just drop a mailman/lists/LISTNAME/config.pck into cPanel, even if yo put it in /usr/local/cpanel/3rdparty/mailman/lists/LISTNAME_DOMAIN/config.pck, because the internal name in the config.pck is wrong.
Thank you (and to Brian Carpenter for his separate reply). I do not have access to the /usr/local/cpanel/3rdparty directory myself. However, the hosting provider has said that they can put the archives in the right location here; the hard thing is, as you say, getting the lists themselves in place. Rather than trying something that's probably impossible with the access I have, I'll just redo the lists manually and then get the archives set.
I do hope this goes OK; I feel like it would have been relatively straightforward if I were using a dedicated server instead of a shared system, but I'm getting this set up for someone with no computer skills, and they need something like a shared, supported environment with something like cPanel for when I'm not around to maintain it.

On Tue, 15 Jan 2019 at 18:08, Jesse Sheidlower <jester@panix.com> wrote:
On Mon, Jan 14, 2019 at 08:20:21AM -0800, Mark Sapiro wrote:
On 1/14/19 4:02 AM, Jesse Sheidlower wrote:
I'm trying to migrate a group of Mailman lists onto a new shared
hosting provider. I do not have direct access to the original system; the sysadmin there has given me a full tarball of the mailman directory, including the archives/, data/, and lists/ subdirectories.
Yes and No.
There is some info at <https://wiki.list.org/DOC/Mailman%20and%20CPanel>. The most important thing is that the 'mailman' directory in cPanel is at /usr/local/cpanel/3rdparty/mailman.
Importing archives is not a problem. Importing lists is an issue because of cPanel's appending the domain to the internal listname, so you can't just drop a mailman/lists/LISTNAME/config.pck into cPanel, even if yo put it in /usr/local/cpanel/3rdparty/mailman/lists/LISTNAME_DOMAIN/config.pck, because the internal name in the config.pck is wrong.
Thank you (and to Brian Carpenter for his separate reply). I do not have access to the /usr/local/cpanel/3rdparty directory myself. However, the hosting provider has said that they can put the archives in the right location here; the hard thing is, as you say, getting the lists themselves in place. Rather than trying something that's probably impossible with the access I have, I'll just redo the lists manually and then get the archives set.
I do hope this goes OK; I feel like it would have been relatively straightforward if I were using a dedicated server instead of a shared system, but I'm getting this set up for someone with no computer skills, and they need something like a shared, supported environment with something like cPanel for when I'm not around to maintain it.
The thing is, because you have the tarbals, you could install mailman on your machine and use it to extract the list configs and the list members. You could then pass the list config to the cPanel folks to import while putting the archives at the right place. The members you could just add once lists are up. Anyway, I am sure you will hack it.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)

Thank you (and to Brian Carpenter for his separate reply). I do not have access to the /usr/local/cpanel/3rdparty directory myself. However, the hosting provider has said that they can put the archives in the right location here; the hard thing is, as you say, getting the lists themselves in place. Rather than trying something that's probably impossible with the access I have, I'll just redo the lists manually and then get the archives set.
I do hope this goes OK; I feel like it would have been relatively straightforward if I were using a dedicated server instead of a shared system, but I'm getting this set up for someone with no computer skills, and they need something like a shared, supported environment with something like cPanel for when I'm not around to maintain it.
If the host is willing to move your archives then they can do the same for your lists. This is what you do:
Log into cPanel
Create the lists that you are migrating over.
Contact the host and ask them to overwrite those list directories that cPanel created with your back ups. It takes a few minutes to do that. Make sure they run /scripts/fixmailinglistperms on each list after they do that.
Brian Carpenter Owner
Providing Cloud Services and more for over 15 years.
T: 336.755.0685 E: brian@emwd.com www.emwd.com www.mailmanhost.com www.mailman3host.com

On 1/15/19 7:44 AM, Brian Carpenter wrote:
If the host is willing to move your archives then they can do the same for your lists. This is what you do:
Log into cPanel
Create the lists that you are migrating over.
Contact the host and ask them to overwrite those list directories that cPanel created with your back ups. It takes a few minutes to do that. Make sure they run /scripts/fixmailinglistperms on each list after they do that.
I may be wrong because Brian knows more about cPanel than I do, and I don't know what /scripts/fixmailinglistperms does, but I see an issue with the above.
Namely, if the backups don't come from cPanel, the list's _internal_name in the backup won't have the _domain appendage that cPanel list's have and if the new domain is not the old one, the list's web_page_url will have the wrong domain name. Also, the list's host_name may be wrong, but that can be fixed via the Mailman web UI, but without a correct web_page_url, none of the web form submissions will work.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

-----Original Message----- From: Mailman-Users <mailman-users- bounces+brian=emwd.com@python.org> On Behalf Of Mark Sapiro Sent: Tuesday, January 15, 2019 6:04 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] Restoring manually backed-up archives into cPanel installation?
On 1/15/19 7:44 AM, Brian Carpenter wrote:
If the host is willing to move your archives then they can do the same
for
your lists. This is what you do:
Log into cPanel
Create the lists that you are migrating over.
I may be wrong because Brian knows more about cPanel than I do, and I don't know what /scripts/fixmailinglistperms does, but I see an issue with the above.
Namely, if the backups don't come from cPanel, the list's _internal_name in the backup won't have the _domain appendage that cPanel list's have and if the new domain is not the old one, the list's web_page_url will have the wrong domain name. Also, the list's host_name may be wrong, but that can be fixed via the Mailman web UI, but without a correct web_page_url, none of the web form submissions will work.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
That is why you first create the lists via the cPanel interface. Overwriting the contents of the list directory with the backups will not interfere with cPanel's list naming approach if those lists were first created by cPanel.
I am assuming the list domain is still the same. If it is not then the host of the server has some more work to do but you can still migrate them over to the new domain fairly easy. I do it all the time using the fix_url script.
Brian Carpenter Owner
Providing Cloud Services and more for over 15 years.
T: 336.755.0685 E: brian@emwd.com www.emwd.com

On 1/15/19 3:40 PM, Brian Carpenter wrote:
-----Original Message----- From: Mark Sapiro ... I may be wrong because Brian knows more about cPanel than I do, and I don't know what /scripts/fixmailinglistperms does, but I see an issue with the above.
Namely, if the backups don't come from cPanel, the list's _internal_name in the backup won't have the _domain appendage that cPanel list's have and if the new domain is not the old one, the list's web_page_url will have the wrong domain name. Also, the list's host_name may be wrong, but that can be fixed via the Mailman web UI, but without a correct web_page_url, none of the web form submissions will work. ... That is why you first create the lists via the cPanel interface. Overwriting the contents of the list directory with the backups will not interfere with cPanel's list naming approach if those lists were first created by cPanel.
I wasn't concerned about things like the directory names. I was concerned that the list's _internal_name attribute in the config.pck created by cPanel would be the listname_domain cPanel name and the value in the backed up config.pck would be just the listname.
However, as I said, "Brian knows more about cPanel than I do" and I have now looked at the cPanel Mailman patches that I have (an old set from 2.1.13, but I doubt they've changed much), and it seems that even in cPanel, the _internal_name attribute is just the listname without the _domain appendage, so I withdraw my concern.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Brian Carpenter
-
Jesse Sheidlower
-
Mark Sapiro
-
Odhiambo Washington