manual site migration between webservers with the same master

Discussion in 'General' started by nhybgtvfr, Nov 25, 2024.

  1. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    hi @till
    i need to move sites between an old server in a datacentre we're leaving (aws), and copy them to a new server in a new datacentre (hetzner)
    both servers are using the same master ispconfig server, already moved to the new datacentre using ispcopy.

    i know you're close to finishing a tool to manage doing exactly this, but i can't wait until january for a chance to beta test it. it'll cost me several hundred dollars each month to keep the old AWS server going, and the new servers are already setup and running.

    it's been around a decade since i've moved sites between ispconfig servers this way, and i just want to double check i'm not missing/forgetting anything..

    so, as far as i can remember, the procedure should be:

    1.. reduce the TTL for relevant A, AAAA, CNAME records to the minimum, eg 600 seconds..
    2. wait for TTL change data to propagate..
    3. in the master database, edit the following tables:
    cron
    ftp_user
    shell_user
    web_backup
    web_domain
    web_database
    web_folder
    web_folder_user
    webdav_user
    updating the server_id field with the server_id of the new server
    4. in the master database edit the client table, appending the server_id of the new server to the web_servers, and db_servers field of the affected client.
    possibly also update the server_id data for the fields default_webserver, and default_dbserver, but not strictly necessary?
    5. resync all services and client/reseller data on the new target server.
    6. disable site in ispconfig, or put it in maintenance mode..
    7. copy (rsync) over
    /var/www/clients/client#/web#/web
    /var/www/clients/client#/web#/private
    /var/www/clients/client#/web#/home
    /var/www/clients/client#/web/#/backup
    /var/backup/web#
    and any vhost alias/subdomain folders using / instead of /web
    8. export db from old server, import on new server phpmyadmin, or mysqldump over ssh into mysql on target
    8. test site is ok (editing local hosts file to get name resolution)
    9. update A,AAAA records to point to the new target server
    10. re-enable site in ispconfig, disable maintenance mode on site
    11. clean up dbispconfig database on source webserver..
    delete entire relevant row(s) in tables edited in step 3 above? (no changes/deletions needed for client table)
    12. increase the ttl settings that were reduced in step 1.

    so have i missed/forgotten anything? or is there a better method for any part, (thinking mostly step 11 here.)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If it's a migration from one old server to one new server, you can do that with ISPCopy (which is part of the Migration Toolkit). The only limitation is that you can not switch between Linux distributions in this step, so old and new system should use the same Distribution, and versions should not be too much different. The new tool I'm developing is mostly a GUI-based version for moving single sites. To move a whole server within a multiserver system, ISPCopy is the right tool.

    If you want to migrate specific sites only or sites one by one, your steps should be fine. If you plan to shut down the old server, you can likely skip the step of cleaning up the source system.
     
  3. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    thanks till.

    yeah, i'd love to use isp_copy to do it, but it's not going to be possible, too many of the sites have external dns, it'll be impossible to co-ordinate a single time where i can move then all in one go..
    instead i'm gonna have to move each site individually, keeping open the possibility of having to still change settings on sites / users on the old server.. otherwise i'd just use isp_copy anyway and point what i can do the new server, and then go through what's left, getting dns changed as and when i can.. but i guarantee if i did that, someone still stuck with external dns pointing to the old server will demand a change of php version, or an ftp password change or something.

    want to try to get as many as possible of the sites moved this month, so i can at least start to downsize the old server a bit..
     

Share This Page