• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Plesk Migrator does not copy databases from DirectAdmin.

peter21581

New Pleskian
Server operating system version
Ubuntu 22.04.3 LTS
Plesk version and microupdate number
Plesk Obsidian Version 18.0.54 Update #2
Greetings (again),
I've transitioned to being a Plesk user at last! Previously, I highlighted an issue with Plesk Migrator version 2.24.0-1083, tagged as ID PMT-5179. However, the updated Plesk Migrator 2.24.1-1089 presents another challenge that stems from my earlier fix (PMT-5179).

For a seamless Directadmin migration, you'll need to implement both the earlier fix and this new one. I share this in hopes of assisting others migrating from DirectAdmin.

I'm aware that the DirectAdmin Migration code might be dated, but the Custom Source is even older. There's a need to add a code to determine whether it's operating on a Windows or UNIX system (which I did below).

Source Control Panel: DirectAdmin v.1.651
Source OS: CentOS 7.9
Source DB: MariaDB 10.5.17

Problem:

ApplicationFrameHost_XczOh6mpvC.png
Code:
+|2023-08-07_16:03:55,842|D|MT|core.runners.base|||Execute command on the local server: rsync -l --chmod=Fu=rw,Du=rwx,go= --timeout=30 -e 'ssh -i /usr/local/psa/var/modules/panel-migrator/sessions/20230807155317/ssh-keys/id_rsa.IP -p 22 -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no' /usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/extras/mysql.exe root@IP:/root/plesk_migrator/plesk_migrator-01zrbppahizztmizkb4tu6kpyid6mjkc/mysql.exe
+|2023-08-07_16:03:56,109|D|MT|core.runners.base|||Command execution results:
=|2023-08-07_16:03:56,109|D|MT|core.runners.base|||stdout:
=|2023-08-07_16:03:56,109|D|MT|core.runners.base|||stderr:
=|2023-08-07_16:03:56,109|D|MT|core.runners.base|||exit code: 0
+|2023-08-07_16:03:56,112|D|MT|core.runners.base|||Execute command on the source server 'directadmin' (IP): /root/plesk_migrator/plesk_migrator-01zrbppahizztmizkb4tu6kpyid6mjkc/mysql.exe -h localhost -P 3306 -uda_admin -p'***hidden***' --silent --skip-column-names -e 'SHOW VARIABLES LIKE '"'"'innodb_strict_mode'"'"''
+|2023-08-07_16:03:56,132|D|MT|core.runners.base|||Command execution results:
=|2023-08-07_16:03:56,132|D|MT|core.runners.base|||stdout:
=|2023-08-07_16:03:56,132|D|MT|core.runners.base|||stderr: bash: /root/plesk_migrator/plesk_migrator-01zrbppahizztmizkb4tu6kpyid6mjkc/mysql.exe: Permission denied
=|2023-08-07_16:03:56,132|D|MT|core.runners.base|||
=|2023-08-07_16:03:56,132|D|MT|core.runners.base|||exit code: 126
+|2023-08-07_16:03:56,133|D|MT|core.workflow.runner.by_subscription|||Exception:
=|Traceback (most recent call last):
=|  File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/workflow/runner/by_subscription.py", line 167, in run_multi_attempts
=|    run()
=|  File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/workflow/runner/by_subscription.py", line 156, in run
=|    action.run(self._context)
=|  File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/actions/hosting_settings/check/mysql_innodb_strict_mode.py", line 70, in run
=|    if not is_mysql_innodb_strict_mode(source_database_server):
=|  File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/utils/database_utils.py", line 1977, in is_mysql_innodb_strict_mode
=|    innodb_strict_mode = get_mysql_variable(server, 'innodb_strict_mode')
=|  File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/utils/database_utils.py", line 2025, in get_mysql_variable
=|    query_result = runner.execute_command(command, args).stdout
=|  File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/runners/base.py", line 125, in execute_command
=|    execution_options.log_output, output_encoding
=|  File "/usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/core/runners/base.py", line 162, in _check_exit_code


Solution:
On Ubuntu edit file /opt/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/plesk/source/custom/connections.py
On Almalinux edit file /usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/plesk/source/custom/connections.py
Line: 215
From:
PHP:
@cached
    def get_path_to_mysql(self):
        """Deploy mysql.exe and return path to it on that source server

        :rtype: str
        """
        return deploy_mysql_client(self)
To:
PHP:
@cached
    def get_path_to_mysql(self):
        """
        :rtype: str | unicode
        """
        if self.is_windows():
            return deploy_mysql_client(self)
        else:
            return 'mysql'
 
If you're considering transitioning from DirectAdmin with Almalinux or Cloudlinux to Plesk on Almalinux or CloudLinux, give this script a shot. It might simplify and streamline your migration process.

curl -L -o da2plesk.sh https://raw.githubusercontent.com/peter21581/DirectAdmin2Plesk/main/da2plesk.sh && chmod +x da2plesk.sh && ./da2plesk.sh
 
Back
Top