Moving sites/databases between multi-server setup?

Discussion in 'General' started by snowfly, Feb 1, 2012.

  1. snowfly

    snowfly Member

    Is it possible to move sites/databases/ftp-users between servers that are part of a multi-server ISPConfig setup?

    We want to move selected sites/database/ftp-users from serverX (debian 6.0 ISPConfig to serverY (debian 6.0 ISPConfig, and preserve all site settings, & database/ftp passwords.

    Both servers are setup exactly the same, but have different resources (e.g. more ram/disk/cpu)

    The Server dropdown box in the ISPConfig control panel is disabled for existing sites/databases.

    I would presume something like this, but not sure correct methods:
    - copy site/database/ftp config to new server
    - mirror data across to new server (rsync/ftp)
    - delete site/database/ftp config from old server

    Anyone else done this?
  2. patrick3853

    patrick3853 New Member

    I did this several times in ISPConfig2 but haven't in version 3. You are on the right track, but I'm assuming serverY has a different IP address. After you have migrated the databases and files, you will have to do a find/replace on all the config files and replace the serverX's IP with serverY's IP. If you are running bind9 or another DNS be sure to update the IP in all the zone files. I will try to dig up the post I made on this with version 2 but it's been a few years. Hopefully that will get you started in the right direction.
  3. patrick3853

    patrick3853 New Member

    Check out my post towards the bottom of this page. It is regarding ISPConfig2 but should give you an idea of what you need to do for the IP address.

    Also read the last post directly below mine. Instead of running the sql queries I would recommend using mysqldump to generate a backup of the ISPConfig database, then do the perl on-liner on the sql backup file, and import it back into the database. This way you won't miss any occurrences of the old IP address
    Last edited: Feb 7, 2012
  4. zbuzanic

    zbuzanic Member

    I've migrated few sites recently:

    - first backup site & db :)
    - delete site / db
    - change DNS (A record and everything else you need)
    - create site & db & ftp on new server with same username/password
    - extract site content to appropriate dir (be careful with stats dir and with permissions)
    - import db

    That should do it, I didn't had any problems after migration except with stats folder but fixed it with right permissions
  5. snowfly

    snowfly Member

    Thanks, that looks fairly straight forward.

    The main concern I had about deleting the current site (on serverX) and creating a new site (on serverY) would create a new domain/web ID, and new owner, and whether that caused any issues.

    I'll try and setup a dev server and do a dummy run first.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    It creates a new webID user, but this should not matter when you chown the files to the new username after you uploaded them to the other server.
  7. snowfly

    snowfly Member

    I've got a bunch of sites to move (30+), but need to have the same ftp user/passwd settings and same database user/passwd on the new server.

    It appears these passwords are encrypted in the dbispconfig database, so how do I re-create these sites/ftp/database on the new server using the same passwords?

    Is that possible?
    I do not know the passwords, this is on behalf of a client.
  8. falko

    falko Super Moderator ISPConfig Developer

    FTP users authenticate directly against the ISPConfig database, so you can simply copy the encrypted passwords.
  9. snowfly

    snowfly Member

    Thanks, that will work.

    Doesn't help the mysql database passwords though.
    I may have to write a script which trawls through any website files and looks for php mysql_connect password settings, and use those to move the database across to the new server.
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    This works for the mysql database passwords as well. You dont have to reset any passwords in your site scripts as you can copy over the mysql permission records from the old to the new mysql database.

Share This Page