Migrating to a Different Host with Cloned Database
About this task
To migrate an environment to a different host with a cloned database, using a composite template:
Procedure
- Clone the database you use for the environment to the target host, following the instructions provided by your database vendor.
- Create a custom composite template of the environment as described in Creating a Custom Composite Template.
-
In the templates/products/product_instance sections, set
the database parameters of the product instances to point to the cloned
database. For example:
templates: templateAlias: products: productID: productInstance_name: db.url: ${db.cloned.url} db.username: ${db.cloned.username} db.password: ${db.cloned.password}The database parameters of the product instance in this example template snippet refer to the values of
db.cloned.url,db.cloned.username, anddb.cloned.password, which you can specify either in the environment/default section of the template definition or in a separate environment properties file. In the following example, the values of the cloned database parameters are set in an environment properties file:db.cloned.url=“jdbc:wm:sqlserver://dbhost1:1433;databaseName=db1_CLONED” db.cloned.username=myDbUser_CLONED db.cloned.password=myDbpassword_CLONED -
In the migration/nodes section of
the template definition, define the host of the source node alias. For example:
migration: nodes envType1: node1: host: ${src.host} -
In the nodes section, define a
target host different from the source host for the same node alias. For
example:
nodes envType1: node1: host: ${other.host} -
If you want to use a source archive
that already exists on the
Command Central source host or on the
target host, set the migration section options as follows:
migration: options: backup: execute: falseWhen
execute: false, Command Central searches for the source archive:- On the Command Central host, in CommandCentral_directory/profiles/CCE/data/migration/source/migration_source_templateAlias_nodeAlias
- If
Command Central does not find the archive
on its own host, it searches on the target host, in
user.home/migration_source_templateAlias_nodeAlias or at the location
that you specify in the
targetPathparameter of thebackupoption. For example:migration: options: backup: execute: false targetPath: C:\sag\myArchive_node1
- Import the composite template in Command Central and apply the template.