recovering from disaster....

Discussion in 'ISPConfig 3 Priority Support' started by craig baker, Oct 12, 2025.

  1. craig baker

    craig baker Member HowtoForge Supporter

    I am needing to replace and existing older server.
    old is ns10 new is ns11
    I've setup ns11 as deb12 with --use-certbot
    now I can migrate from old centos to new deb12.
    but I want to retire the ns10.
    on new server I can rename ns11 to ns10 and change the static internal ip. now all references to ns10 will come to new server.
    renaming in hostname, and i ispconfig from ns11 to 10 of course.
    is this sufficient? as the router routes external static to the internal ip (192.168.2.15 will turn into 192.168.2.20) is there anything else I need to do?
    or will the new server now perform properly?

    cdb.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Is this a node in a multiserver setup?
    Is this your primary DNS server?
    Does this server contain DNS records only?
     
  3. craig baker

    craig baker Member HowtoForge Supporter

    ns10 is a primary dns server. it also has websites, emails, mongodb, various other things.
    not a multiserver setup.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. Yes, you can change DNS hostname later and create a new SSL cert by running ispconfig_update.sh --force.
     
  5. craig baker

    craig baker Member HowtoForge Supporter

    I believe I've found a bug in the migration process.
    I ran it and we got to a point where it reported
    [WARN] Source dir/file /var/www/clients/web8/web/nextcloud/ for web server does not exist. Skipping sync job.

    This was correct, that folder I had deleted. but there was an entry under vhost for nextcloud.cdbsystems.com referring to this folder.

    later when we got the line:
    Replacing /var/www/clients/client0/web8/web/nextcloud by /var/www/clients/client0/web/web in /var/www/c....

    but the migration task HUNG at this point. hours later we were still at 'Replacing' with no further action.

    I control-c'd out and reran migration after deleting the vhost with the missing folder, but surely migration should not hang up??
    anyway I'm doing the migration currently and we are well past this point!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    That's the reason for the issue. When you remove parts of the setup, the tools can fail as they must rely on the gact that your actual setup is in sync with the specs of the site.
     
  7. craig baker

    craig baker Member HowtoForge Supporter

    agreed thats whats messing things up - but why would not the dry run detect things that will break the migration before starting doing it?
    dryrun said all was good!
    I've spent many hours so far attempting the migration, and 3 times now it has hung, always with 'Replace' command the last thing being issued. a reality check before beginning the migration might be of great benefit! what about that command is hanging anyway?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    How should a dry run detect something that can only be detected by doing the actual migration? What failed here is not the Migration Tool; it's sed or rsync. If you want a dry-run to detect this, it would have to do the complete migration and copy over all files; in other words, it would do the final migration, which would make no sense, as it wouldn't be a dry-run then.
     
    Last edited: Oct 14, 2025
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Undo the changes you manually made to the file structure that cause rsync to fail. Also, how many hours did you wait? because it does not mean something is hanging when it just takes a long time e.g. because its a lot of data.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Just a guess, did you use any symlinks while changing this directory? Maybe you created a circular loop with symlinks, which means an application that tries to modify files gets stuck in an endless loop because it keeps following the symlinks you set.
     
  11. craig baker

    craig baker Member HowtoForge Supporter

    I've deleted the vhosts and trying again....
    but some (hopefully useful) oberrvations? might be nice if migrate had a 'recover' to start where it left off? yo seem to be logging everything nicely. that way I dont have to go through the whole slog if I know nothing has changed!
     
  12. craig baker

    craig baker Member HowtoForge Supporter

    now rsyncing mail maybe this time is the charm!
    GREAT tool btw :)
     
  13. craig baker

    craig baker Member HowtoForge Supporter

    alas it seems migtool locks all databases up and email was unreachable by roundcube. got up to 3527/4171 but I had to kill it to stop the screaming from customers :(
    it was sitting at dumping database c0mazdaworld... may not be important anyway

    any way to have it start at dumping databases? seems it got through all sync /var/lib/vmail tasks...
     
  14. craig baker

    craig baker Member HowtoForge Supporter

    also whats left after dumping the databases? maybe I can move them over via usb.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    The Migtool does not lock all databases during migration. Each database is dumped individually using the mysqldump command; other databases are not affected. If you had side effects, then they were probably caused by the additional load on the database server while the databases get dumped.

    No, the sync is a complete process. The resync of files is done with rsync, so it typically takes just a few seconds if there have not been many changes.
     
    ahrasis likes this.
  16. craig baker

    craig baker Member HowtoForge Supporter

    well the migration has hung 3 times at the same mysqldump command on the same database... gotta be a problem with that database. I'll try to see if I can determine a problem, but it spent many hours stuck at the command- and at the same time roundcube (which depends on a db) always and instantly reported 'database connection error'. till I killed migration, then roundcube worked instantly.
    can I move this database to the /root folder and hopefully migration will ignore it?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    First, you should try to run a repair and optimize on that database, e.g., using phpmyadmin, maybe it's broken and causes your MySQL server to fail. Then you can try to dump it manually to see if you get any helpful error messages.

    If the database exists in ISPConfig, the tool will try to migrate it. What you can try is that you exclude it with:

    --exclude-database=<databasename>

    Option, see the last chapter of the migration tutorial https://www.howtoforge.com/tutorial...-confixx-plesk-to-ispconfig-31-single-server/

    Ok, so your MySQL system had an issue then, maybe overloaded or something similar, and not the migration tool locked other databases as you claimed.
     
    ahrasis likes this.
  18. craig baker

    craig baker Member HowtoForge Supporter

    in phpmyadmin i'm unable to copy the database gives a 504 error even though max_execution_time set to -1 (infinity) and the max_memory set to 2048M. surely 2g is enough?
    any other ideas?
     
  19. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Have you repaired the database as advised?

    2gb is more than enough but infinity exec time? that is is a little bit crazy to me because its purpose is to fail at some prescribed time.
     
    till likes this.
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    So you seem to have a general issue with that database and not with the Migration Tool, as you can not copy it with phpmadmin too. Please try to run a repair like I suggested. Also, how big is that database (iny MB or GB) and does it e.g. has a table with a very large number of records? Maybe a website or application has written a very large database by e.g. writing log data without cleanup or similar. And finally, I mentioned above how you can exclude that database from getting migrated.
     

Share This Page