This topic describes how to migrate an existing Controller from a physical or virtual machine to a physical machine. Prior to migrating consider backing up the existing Controller.
Migrate by Copying the Data Directory
The following instructions take you through the steps for installing the Controller on a new machine and migrating the Controller data from an old machine.
To migrate Controller data to new machine
- Ensure that the performance profile of the new machine matches the old machine. For profile information see Controller System Requirements.
- Ensure that the new Controller version matches the old Controller version. If necessary, upgrade the old Controller first.
- Back up the MySQL root user password from <Controller_Installation_Directory>/db/.rootpw.
- Install a new Controller on the destination machine.
The old and new Controllers must be the same version. - After installing the new Controller, shut the new Controller down. For details see Start or Stop the Controller.
- Rename the old Controller machine to a new name and IP address.
- Rename the new Controller machine to the name and IP address of the old Controller machine.
- Get the new MAC address and provide it to AppDynamics Sales at salesops@appdynamics.com to get a new license file.
- Export the App Tier configurations from the old Controller and save them to the new machine. For details see Export and Import Business Application Configurations.
- Shut down the old Controller. By shutting down the old Controller before copying its data, you ensure that all the data is moved to the new machine. For details see Start or Stop the Controller.
- On the new machine, rename the data directory, <Controller_Installation_Directory>/db/data, so that it is not overwritten by the original data. For example, rename "data" to "data_default".
- Copy the data directory from the original Controller machine to the new machine.
- Copy files that may contain configuration customizations from the original Controller directory to the equivalent directory on the new machine. The files to copy are:
- <Controller_Installation_Directory>/db/db.cnf
- <Controller_Installation_Directory>/appserver/glassfish/domains/domain1/config/domain.xml
- <Controller_Installation_Directory>/appserver/glassfish/domains/domain1/config/ (any other customizations in this directory)
- <Controller_Installation_Directory>/appserver/glassfish/domains/domain1/appagent
- <Controller_Installation_Directory>/appserver/glassfish/domains/domain1/applications/controller/controller-web_war/WEB-INF/flex/services-config.xml (if using SSL)
- Start the Controller on the new machine. For details see Start or Stop the Controller.
Migrating by Copying the Entire Controller Directory
Instead of migrating a data directory to a new Controller installation, as described in the previous section, it's possible to migrate a Controller between machines by simply copying the entire Controller directory.
However, there are two requirements to performing the migration in this manner:
- The new machine should have the same IP address and host name as the old machine.
- The new machine should have the exact same directory structure as the old installation location.
To migrate by copying the Controller directory to a new machine
- Shut down the old Controller. Shutting down the Controller before copying its data ensures that all data will be moved to the new machine. For details see Start or Stop the Controller.
- Copy the <Controller_Installation_Directory> from the old machine to the new machine.
Copy the directory into the exact same directory structure. - Start the Controller on the new machine. For details see Start or Stop the Controller.
IMPORTANT: Do not ever start the Controller on the old machine again!
Controller Migration FAQ
After moving the data to the new machine, why do I get a 443, permission denied error?
This can happen if port 443 is bound to some other application. Change the HTTPS port, for example, from 443 to 5443.
Can I take a hot backup and use that for the new machine?
You can perform the migration with data from either a hot or cold backup, but it is important to get the backup of the data directory from <Controller_Installation_Directory>/db. However, AppDynamics strongly recommends that you perform a cold backup of the data.
A hot backup will not bring the Controller down for a long time, but you will still lose the data when you migrate. This is because hot backup will only have the data from the point that the hot backup started and not when it ended.
Do I need a new license if moving the Controller from a virtual to a physical environment?
If the physical machine has the same MAC address, you can reuse the license. If that is not the case, please contact salesops@appdynamics.com to request a new license.