Recover server from secondary

Discussion in 'ISPConfig 3 Priority Support' started by Fermin, Jan 21, 2025.

  1. Fermin

    Fermin New Member HowtoForge Supporter

    Hi,
    I have a problem.
    The primary server is not recoverable.
    I can recover it based on the secondary server.

    I'm sure there is some forum post, but I can't find it right now "I'm ........"
     
  2. Fermin

    Fermin New Member HowtoForge Supporter

    Can I attempt a migration to a new server from the secondary server?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try that using Migration Tool in dry-run mode. You do not need a license for this test mode. If the migration tool does not complain that something is missing, then it should work.
     
  4. Fermin

    Fermin New Member HowtoForge Supporter

    I have a license. (It's a fantastic tool)
    Thanks, I'm going to try it now
     
  5. Fermin

    Fermin New Member HowtoForge Supporter

    It works but does not perform the migration.

    Code:
    Starting API calls.
    [5/5] <Client> processing client05 ()                                                                                                                                                                                                                             
    Processing of entries done.                                                                                                                                                                                                                                                       
    Target ISPConfig job queue has 5 entries left. Waiting . 
    [INFO] Target ISPConfig job queue has completed. Continuing.
    
    [INFO] Skipping system server as we have no job entries for this target.
    [WARN] Skipping web entries as SSH ip setting is missing.
    [INFO] Skipping mail server as we have no job entries for this target.
    [INFO] Skipping db server as we have no job entries for this target.
    =============
    Migration tool run completed.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Was this a dry-run or real run mode, and what#s on this server(web, DNS, Emails)?
     
  7. Fermin

    Fermin New Member HowtoForge Supporter

    It is a real run, since dry-run did not show errors

    dry-run

    Code:
    Starting API calls.
    [5/5] <Client> processing client05 ()                                                                                                                                                                                                                             
    Processing of entries done.                                                                                                                                                                                                                                                       
    
    =============
    Migration tool run completed.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so on this server, there are just 5 clients, according to the tool, and these got migt´rated. What is hosted on that system?
     
  9. Fermin

    Fermin New Member HowtoForge Supporter

    Note: I had to recreate the clients on the new server as the error was show
    Code:
    Starting API calls.
    [ERROR] client client01 is missing on target. It can only be imported from MASTER server.                                                                                                                                                                             
    [INFO] If you do not want to migrate the full master server contents, then run ./migrate --only=client --no-syncjobs from the master server.
    [ERROR] Stopping migration.
     
  10. Fermin

    Fermin New Member HowtoForge Supporter

    mail and dns server
     
  11. Fermin

    Fermin New Member HowtoForge Supporter

    ok, my bad
    the database name is dbispconfig2, not dbispconfig

    Now dry-run finish ok.

    On real run mode...

    Code:
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
    [ERROR] API call to mail_domain_add failed. See log file for details.                                                                                                                                                                                               
    [ERROR] API call to config_value_replace failed. See log file for details.
     
    till likes this.
  12. Fermin

    Fermin New Member HowtoForge Supporter

    log
    Code:
    2025-01-21 18:30:15 - [ERROR] API call to mail_domain_add failed.
    2025-01-21 18:30:15 - [ERROR] JSON API REPLY ERROR: Invalid client_id 13 - Arguments sent were: array (
      'client_id' => '13',
      'params' =>
      array (
        'server_id' => '1',
        'domain' => 'clientdomain.com',
        'active' => 'y',
        'sys_perm_user' => 'riud',
        'sys_perm_group' => 'ru',
        'sys_perm_other' => '',
    ...
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Ddi you create a client with ID 13?
     
  14. Fermin

    Fermin New Member HowtoForge Supporter

    Yes
    i can see it in database and in the new server GUI
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you could try to make a backup of the dbispconfig database on the new server (e.g. export it with phpmyadmin), then delete the manually created clients on the new system and then try to run the migration again. Maybe the manually created clients cause this problem.
     
  16. Fermin

    Fermin New Member HowtoForge Supporter

    Code:
    [ERROR] client clientname is missing on target. It can only be imported from MASTER server.                                                                                                                                                                         
    [INFO] If you do not want to migrate the full master server contents, then run ./migrate --only=client --no-syncjobs from the master server.
    [ERROR] Stopping migration.
    
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, ok. You said you had a dbispconfig1 and dbispconfig2 database on your system, right? Does the dbispconfig1 contain the data from the failed master?
     
  18. Fermin

    Fermin New Member HowtoForge Supporter

    Hi,
    I finally solved it by creating the users manually and changing the owners of the objects to a generic client

    I checked the errors by sections and edited the fields
    sys_userid and sys_groupid and then proceeded to launch the migration again, see what errors it produced and assign the objects to the generic client.

    Code:
    Example
    update `mail_forwarding`
    SET `sys_userid`=2, `sys_groupid`=2
    WHERE `sys_userid`=7
    It took me quite a few hours.

    I discovered that the mirror was not working correctly, some objects were synchronized, others were not and others had not even been created on the secondary server.

    I received synchronization error alerts but only when the out-of-office responses were modified, I was not informed of other errors.

    As a suggestion I think it would be convenient to have a read-only interface on the secondary servers.

    Thank you very much!!! :)
     
    till likes this.

Share This Page