• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Importing PSA MAIL tables into plesk

tetrahall

Basic Pleskian
Hi,
I have exported 3 psa tables: mail + mail_redir + mail_resp. I am moving to a new webhost using a "sister" domain.
For example, mydomain.com becomes mydomain.net .

My question: How can I import the 3 tables into the new Plesk system files?

Before importing the tables, I will of course need to change 2 things in mail_resp table:
1. IP address
2. domain name.

Please advise. Many thanks!
 
Really bad idea to import modified SQL dumps to psa database.
Describe your goal in more detail. I am sure that it can be done in a more correct way.
 
Thank you, IgorG, for your response. I will try to describe it better. Please bear with me :)

The website mydomain.com deals with job vacancies. Job seekers send emails via the website, then redirected to the actual email addresses of employers, and receive an aut-response message. There are about 7000 emails for employers.

For example:-
addess_01@mydomain.com is redirected to => actual_email_of employer1 (and receive response1)

On daily basis, using SSH I backup the 3 tables (mail + mail_redir + mail_resp), thinking that they are the ones meeded in case I wanted to restore the emails.


Now, I want to host the same website (for development purposes) on mydomain.net
And I don't want to use Plesk Migrator . I prefer to do things manually, Everything else is straight forward and there is no need for "Migrator".

The ip address of the new domain is different. So I thought I needed to change the domain name + ip address in the tables before I could restore them on mydomain.net .

Is there a better "SAFE" way to restore all 3 tables?

Thank you in advance!
 
And I don't want to use Plesk Migrator . I prefer to do things manually, Everything else is straight forward and there is no need for "Migrator".
Of course, it is your right to want or do not want to use the convenient Plesk features. But in my opinion, it is much easier, faster and safer to simply migrate a site and then rename it to mydomain.net on the destination server. I will be only glad if your difficult and dangerous way is crowned with success and you share your successful instruction.
 
IgorG,
Thank you for your response. You are saying that I could migrate the site (domain.com) and then using Plesk rename it to domain.net. Would that take care of changing the mail tables in psa db?

I would appreciate a reply to the above.

Let me tell you why I didn't want to use the migrator. I am a complete novice when it comes to Plesk - I only know few steps. The webhosting company gave me the impression that it should be done by an experienced technical support member. They would charge me £168 pounds for that. And even if I did it myself and something went wrong, and I asked them to look at the migration again, they would still charge me £168 pounds to fix it.

I have searched the net about Plesk migration from 11 to ONYX, some people were having problems with that, it scared me off.

But if it is the best way then I would go for it. Many thanks for your advice in advance.
 
Would that take care of changing the mail tables in psa db?
Yes, that is what will change all the necessary records in psa database in the most correct way.
Moreover, if you don't want to pay extra pounds to your service provider, I'd suggest you ask free migration assistance here Free migration to Plesk
 
Hi,
I would be grateful for help on this: I have tried migrating .. after the preparing stage, the messages mentioned below were displayed. Didn't want to carry on before getting some advice. Please note that PHP 5 is installed on "source", and PHP 7 on ".target". Some of these messages imply that I should use PHP 5?

Unfortunately, the free migration assistance Free migration to Plesk is available to businesses only ( company's name is required), mine is for personal use. Mant thanks.
-------------------------------------------------------------------------
THE DISPLAYED MESSAGES
The following Apache modules are not installed on the destination server: authnz_ldap, ldap, python, authn_default, disk_cache, perl, authz_default, authn_alias.
Please install and enable these modules to prevent possible problems.

The following Apache modules are disabled on the destination server: speling, cgi, usertrack, php5.
Please enable these modules to prevent possible problems.

The component Domain Keys is turned off on the destination server.
The following subscriptions are affected by the issue: domain.com
Please turn on Domain Keys on the destination server.

The PHP handler 5.3 mod_php (id=module) is not available on the destination server. Instead, Plesk will use the following PHP handler: 5.3.29 CGI application (id=plesk-php53-cgi).
The following subscriptions are affected by the issue: domain.com

To use the same PHP handler as on the source server, you should turn on or install it on the destination server.
The component mod_perl is not installed on the destination server. mod_perl will be unavailable for all restored objects.
The following subscriptions are affected by the issue: domain.com
-------------------------------------------------------------------------
 
This is a very bad idea to continue using the old outdated and EOLed PHP5.x version. We always recommend upgrading to version 7.x if your code is not strictly tied to using PHP5.x version.
 
IgorG,
Thank you for your help, Much obliged. Sorry to trouble you with this but I am getting the error mentioned below.
I logged in as administrator and tried a fresh migration but the same error is displayed again.
Thank you!
--------------
Error: Plesk Migrator returned non-zero exit code COMMAND: '/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator' 'add-task' '/usr/local/psa/var/modules/panel-migrator/sessions/20190411124211/config.ini' '--command-file' '/usr/local/psa/var/modules/panel-migrator/sessions/20190411124211/new-task-command.json' '--migration-list-file' '/usr/local/psa/var/modules/panel-migrator/sessions/20190411124211/migration-list.json' '--task-id' '2019-04-11-12-44-51' EXIT CODE: 1 STDOUT: [2019-04-11 12:44:52][INFO] Initialize Plesk Migrator [2019-04-11 12:44:52][INFO] Target Plesk host: xx.xx.xx.xx [2019-04-11 12:44:52][INFO] Source Plesk 'source' host: xx.xx.xx.xx [2019-04-11 12:44:52][INFO] Target Plesk host: xx.xx.xx.xx [2019-04-11 12:44:52][ERROR] Failed to add new migration task Cause: 'list' object has no attribute 'iteritems' That is a critical error, migration was stopped. STDERR:
 
Update:
I restarted the pc, stopped previous ones and started a fresh migration. It seems to be going now.
I hope it works, still doing it.
 
Thank you for the link. It seems to be working now, the green arrow is flashing, pointing at: "Deploy auxiliary users of subscription". The "Migration status:" is not showing any progress. Below it: 0 done of 1 subscriptions in queue.

The odd thing is that while it is still migrating, Plesk's login menu is displayed and I had to enter user + password. This has happened twice so far. Is it normal?
 
I hit a problem with renaming the domain. Migration worked after a long time but the database, all the website files, and emails appear to be alright.

Then I tried to rename domain.com (Websites & Domains -> Hosting Settings), changed com to net, then Apply.

It was doing something for a long time, then a message is displayed (forgot the exact wording but something like this is taking a long time .. ). I left the computer on all night, and in the morning, exited Plesk, restarted the pc, and tried renaming again. Now I am getting this message:-

Error: DB query failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[email protected]-1' for key 'spamfilter_username_serviceNodeId', query was: insert into spamfilter (`id`,`username`,`preferences`,`serviceNodeId`) VALUES ('0','[email protected]','true','1')

Is there a plesk command to erase or completely undo any incomplete changes caused by the first attempt?

Many thanks!
 
Have you imported mentioned initially dumps before migration? In this case, there are maybe database inconsistencies. Try to repair datanase with

# plesk repair db

Contact Plesk Support Team if not help.
 
Thank you IgorG, for your patience. This will be the last message.

No, I didn't import anything, I went straight to Plesk Migrator. It took a long time, but it worked.
Then I tried re-naming the domain. It stoped ater a long time with a message (as mentioned before something to the effect that it has taken long .. etc).

I have tried:
# plesk repair db
Checking the Plesk database using the native database server tools .. [OK]
Checking the structure of the Plesk database ........................ [OK]
Checking the consistency of the Plesk database ...................... [OK]

Plesk don't provide support direct to me. They direct me to the webhosting company (not helpful),

As a last resort, 2 questions, please:
1. How can I access the psa spamfilter table?
I thought if I deleted the entry mentioned in the error message, it could be the only one that is stopping renaming the domain. The message is this:
Duplicate entry '[email protected]-1' for key 'spamfilter_username_serviceNodeId', query was: insert into spamfilter (`id`,`username`,`preferences`,`serviceNodeId`) VALUES ('0','[email protected]','true','1')

2. If the above doesn't work, how can I rebuild the server from scratch again. Then I can repeat migration and see if renaming works.

Many thanks!
 
It's okay.
Apparently there is a bug in Plesk which leads to the error message "This operation is taking too long. Check the results in a few minutes.":
https://support.plesk.com/hc/en-us/articles/115000573465-Apache-service-restarts-twice-while-applying-changes-in-Plesk-on-a-busy-server

Te first failed renaming of the domain left many records in psa tables, when I tried renaming again, the above mentioned (duplicate entries ..) error messages are displayed. I have deleted all records. Will try again. If the need arises, it might be better to start another thread under the title "renaming domains".

Thank you ever so much for your patience. Best regards.
 
Back
Top