ispconfig migration question

Discussion in 'Installation/Configuration' started by Michaeltc, Apr 28, 2018.

  1. Michaeltc

    Michaeltc New Member

    Hi :

    I have create the new server from another place, but I want to only migrate email part and specific domain
    Can I know any tools which allow me to do ?
    as I see
    https://www.ispconfig.org/add-ons/ispconfig-migration-tool/
    it seem migrate the service from all domain in old server, but I just need specific one or two domain
    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can migrate a single domain with the Migration Tool as well, the command is:

    ./migrate --only-web=domain1.de
     
  3. Michaeltc

    Michaeltc New Member

    Hi Till
    Thanks , for the command "./migrate --only-web=domain1.de"
    is that only migrate web ? or if I migrate email for single domain . do I change to --only-mail=domain1.de ?

    Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This option limits the migration to the website with that domain name. To migrate the website and the email domain, use:

    ./migrate --only-web=domain1.de --only-mail=domain1.de

    There is also an option --only-db=databasename if you want to include a database as well.
     
  5. Michaeltc

    Michaeltc New Member

    Dear Till :

    Thanks , is above script need to paid license to do , for trial cannot be done this ?

    Thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    In trial mode, you can do a dry run only. If you want to do a real Migration, then you need a license.
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I'm interested in that --only-db= parameter. Can I use it for about 40 named databases, that are still on the old system database host? So I would repeat the migration run but with --only-db for each of those databases.
    I did the migration a month ago, but those databases were still used from the old system. I'm moving them also now. I have websites already running on the new system, e-mails also. It's only the website databases that are still on the old system.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    @Taleman: It might work, but I haven't tested it. You might try this:

    ./migrate --only-db --only-db=dbname --debug

    Yes, --only-db twice, the second one with = dbname where dbname is the name of the database. The first --only-db tells the software to ignore other dependencies like websites while the second one selects this one database. I recommend that you do a dry run first and then check the migrate.log to see what the software actually tried to migrate. The --debug option just makes a more verbose output in the migrate.log file.
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I installed the new migration tool version 2_0_4p5. I just untarred the files over the old ones. Trying now, result:
    Code:
    root@ispc:~/migration# time /root/migration/migrate --only-db --only-db=username_aho --debug
    
    [ERROR] The --only-db argument requires a valid option, e. g. --only-db=abcde
    
    
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

  11. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    I'm sorry, it is --only-database instead of --only-db
    We changed that a while ago due to inconsistent usage inside the tool.
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Still no luck.
    Code:
    root@ispc:~/migration# time /root/migration/migrate --only-database --only-db=username_aho --debug
    
    [ERROR] The --only-database argument requires a valid option, e. g. --only-database=abcde
    
    real    0m0.533s
    user    0m0.172s
    sys    0m0.084s
    
     
  13. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Oh dear … It really has been a while since I used this. Please try using --only=database --only-database=username_abcde
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Now I got it doing something.
    Log seems to show migrate includes another database because of dependency. I'll look into that. And website is also included as dependency, is migrate going to copy the website files also?

    2018-05-12 16:04:26 - [DEBUG] Setting migrate_status to true for database 70 (username_aho)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for database 54 to true (0 - )
    2018-05-12 16:04:26 - [DEBUG] Including database 54 because of dependency.
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for client 0 to true (1 - dep)
    2018-05-12 16:04:26 - [DEBUG] Including client 0 because of dependency.
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for web 45 to true (1 - dep)
    2018-05-12 16:04:26 - [DEBUG] Including web 45 because of dependency.
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for client 0 to true (2 - dep)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for ftp 17 to true (2 - dep)
    2018-05-12 16:04:26 - [DEBUG] Including ftp 17 because of dependency.
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for client 0 to true (3 - dep)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for web 45 to true (3 - dep)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for database 54 to true (2 - dep)
    2018-05-12 16:04:26 - [DEBUG] Including database 54 because of dependency.
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for client 0 to true (3 - dep)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for web 45 to true (3 - dep)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for dbuser 54 to true (3 - dep)
    2018-05-12 16:04:26 - [DEBUG] Including dbuser 54 because of dependency.
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for client 0 to true (4 - dep)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for database 54 to true (4 - dep)
    2018-05-12 16:04:26 - [DEBUG] Setting migrate status for dbuser 54 to true (1 - dep)
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 Reseller entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 1 Client entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 Domain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 1 WebDomain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 VHost SubDomain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 VHost AliasDomain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 AliasDomain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 SubDomain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailDomain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailAliasDomain entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailUser entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailForward entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailAlias entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailCatchAll entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailFilter entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailTransport entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 MailRelayRecipient entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 SpamFilter entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 SpamFilter Whitelist entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 SpamFilter Blacklist entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 Mailing List entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 1 FTP User entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 Cron Jobs entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 1 Database User entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 1 Database entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 Protected Folder entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 Protected Folder User entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 DNS Zone entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 DNS Record entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 Shell User entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 DataCopy entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice company entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice settings entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice vat rate entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice sepa mandate entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice message template entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice payment term entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice client settings entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice item template entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice item template custom field entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice item category entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice recurring item entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice item entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice message entries.
    2018-05-12 16:04:26 - [INFO] After dependency check: 0 invoice sepa xml export entries.
    2018-05-12 16:04:26 - [DEBUG] JSON API call to server_ip_get completed.
    2018-05-12 16:05:02 - [DEBUG] JSON API call to server_get completed.
    2018-05-12 16:05:04 - [INFO] Successfully executed command mysql -h 'localhost' -u 'root' -p'*************' -e "SELECT VERSION();"
    2018-05-12 16:05:04 - [INFO] Config file saved.
    2018-05-12 16:05:05 - [DEBUG] JSON API call to client_get completed.
    2018-05-12 16:05:05 - [DEBUG] client npertti exists with id 1
    2018-05-12 16:05:05 - [DEBUG] JSON API call to sites_web_domain_get completed.
    2018-05-12 16:05:06 - [DEBUG] JSON API call to sites_cron_get completed.
    2018-05-12 16:05:06 - [DEBUG] JSON API call to sites_web_domain_get completed.
    2018-05-12 16:05:06 - [DEBUG] JSON API call to sites_web_domain_get completed.
    2018-05-12 16:05:06 - [DEBUG] JSON API call to sites_ftp_user_get completed.
    2018-05-12 16:05:06 - [DEBUG] JSON API call to sites_database_user_get completed.
    2018-05-12 16:05:06 - [DEBUG] JSON API call to sites_web_domain_get completed.
    2018-05-12 16:05:07 - [DEBUG] JSON API call to sites_database_get completed.
    ~
     
  15. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Hm, yes. As your database seems to be assigned to a website, the tool calculates the parent website as dependency to migrate and will migrate that data, too.
    If you have no problem with the site being created in ISPConfig but do not want to copy the website contents, you could try running the migration with --no-syncjobs and once completed do another run with --syncjobs --only-database.
    I have not tested this myself, though.
     
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Only the database should be copied over to the target host. Seems it is simpler and less change for disaster if I just dump the database, copy over and restore. Thanks for the help.
     
  17. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes, for a single database the migration tool is kind of "overkill".
     

Share This Page