Mirgating to a new server TIPS

Discussion in 'General' started by LouTux, Aug 30, 2021.

  1. LouTux

    LouTux Member

    I am migrating from an old server running ISPConfig Version: 3.1.15p2 on Debian Stretch. To a new server running ISPConfig Version: 3.2.5 on Ubuntu 20.04.
    My personal experience on Debian Stretch was fine but Debian lacked the repository for many components to be upgraded. This is why I chose to migrate to Ubuntu 20.04 as Ubuntu tends to be more up to date. The old server will be reinstalled and I will attempt to configure it as a back-up web server.
    That being said, I have already installed ISPConfig on the new server. And have purchase the migration tool. But before going ahead and start migrating everything, I wanted to ask for some tips.

    Firstly here is what I have to migrate :
    • 55 Mailboxes
    • 1 Catchall
    • 15 Mail Forwards
    • 13 Websites
    • 7 SQL Databases
    • 7 Databases Users
    • 7 FTP Users
    • ~900GB on /var
    I am looking for some tips to plan a procedure with minimal down time. I of course already looked up https://www.howtoforge.com/tutorial...-confixx-plesk-to-ispconfig-31-single-server/ which provides a detail explanation on how to migrate from 1 server to another. But it lacks in details about availability of both servers.
    ahrasis likes this.
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Do an initial sync of data, then resync just the changed data before taking any services down, at which time you do your final sync.
    ahrasis likes this.
  3. LouTux

    LouTux Member

    Ok I manage to find some time to go over the migration process. I had to make some changes to the SQL server. Other then that, everything looks good. I didn't get any error on my last dry run of the migration tool. Starting the initial sync.
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Personally I also run Ubuntu for that reason but actually maintaining a server is more towards its stability rather than using bleeding edge softwares, unless of course if they are very necessary.

    That said, upgrading to Debian 11 Buster is another choice but again of course next April 2022 there will be Ubuntu 22.04 and by end of that year, normally ISPConfig normally will already support it.
  5. brainsys

    brainsys Member

    Actually Debian 11 (Bullseye) is more up to date than Ubuntu 20.04 in apps & kernel. It also has a longer shelf life. If other 'buntu stuff you like - then waiting for their next LTS 22.04 may be a good option.

    Call it foreboding but I agree with you a fresh install/migration is best. Upgrading an OS under ISPConfig does risk many things going wrong. Personally I have used a 'skip one' strategy with a new set of servers. One set of servers went Jessie > Buster and will go Bookworm (Debian 8>10>12). This gives a 4 year life to the server which is about the limit for application support.

    I find the major issue is PHP support. But with thanks to the sury repositories one can limp on with the websites using the latest while ISPConfig stays with the old.
  6. LouTux

    LouTux Member

    I agree, in this case, the server is running a few web applications that require more bleeding edge software. So my experience with Debian was much more difficult in maintaining those apps.

    In my case, my source server is running Debian 9 Buster, PHP wasn't much of a problem because I added the official php repository. My main issue was with MariaDB. Which I always encountered issues when upgrading. I decided to go with Ubuntu because of the long term support compared to Debian. This makes future updates much more streamline in my opinion.

    I also didn't really want to wait for 22.04 as I wanted to make sure everything runs first. And I know right now, Ubuntu 20.04 is well supported by ISPConfig. There is also the facts that ressources are currently very limited at this point on the source server.

    I will most likely upgrade to ubuntu 22.04 later, most likely somewhere around September 2022. Making sure that 22.04 is running smoothly. While providing enough time to the team of ISPConfig to test the software too.
  7. LouTux

    LouTux Member

    Ok so my first migration completed without any errors. Now to test if everything was working as I expected, I added an entry in my hosts file for one of the website that was migrated. When visiting the URL everything looked good.

    After that I visited the ISPConfig panel and started tweaking some of the changes that I wanted to make at the same time. The first thing I tried was removing the client on the site I tested. My result was that the site was no longer accessible. When looking into the local directories, the directories linked to that site now have permissions only to user root.
    Files in the client directory have the new permissions but not the symbolic link inside /var/www/

    I tried putting the client back on the site. but the permissions remain the same.

    Any thoughts?
    Last edited: Sep 22, 2021
  8. LouTux

    LouTux Member

    At this point my configurations are not working at all. I can setup a new site. But I am unable to do any changes to a migrated site without it getting all messed up and unaccessible.

    Therefore I will only migrate the email addresses from the source server to the target server.

    How can I go about resetting all of ISPConfig to default so I end up with a fresh install?
    Last edited: Sep 22, 2021
  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Did you resync all services? It normally fixes permission issue but I am not so sure about your migration.
  10. LouTux

    LouTux Member

    I tried but ended up with the same results. Could not modify any migrated site without breaking it.
  11. LouTux

    LouTux Member

    Now that I have reset the target server, whenever I try to execute the migration script in dry mode, I am stuck in a loop during the ssh connection. It keeps asking me for a login. I tested the root ssh connection from the source server and I am able to connect.
  12. LouTux

    LouTux Member

    OK fixed the ssh issue by running :
    chown root /root
    chown root /root/.ssh
    chmod go-w ~/
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
  13. LouTux

    LouTux Member

    Alright so after a mail sync, all emails have been transferred. Now while trying to setup the new sites, I encountered some errors with Let's Encrypt because of the left overs of the initial sync I had performed.

    I found that deleting all sites within these directories (Except for the newly created ones) fixed my Let's Encrypt issue and I was able to generate new certificates with CertBot.

    • /etc/letsencrypt/archive/
    • /etc/letsencrypt/live/
    • /etc/letsencrypt/renewal

Share This Page