AJ WCRehostUtilityGuide 12-1-2 0
AJ WCRehostUtilityGuide 12-1-2 0
12.1.2.0
Copyright © 2022 PTC Inc. and/or Its Subsidiary Companies. All Rights
Reserved.
User and training guides and related documentation from PTC Inc. and its
subsidiary companies (collectively "PTC") are subject to the copyright laws of the
United States and other countries and are provided under a license agreement that
restricts copying, disclosure, and use of such documentation. PTC hereby grants to
the licensed software user the right to make copies in printed form of this
documentation if provided on software media, but only for internal/personal use
and in accordance with the license agreement under which the applicable software
is licensed. Any copy made shall include the PTC copyright notice and any other
proprietary notice provided by PTC. Training materials may not be copied without
the express written consent of PTC. This documentation may not be disclosed,
transferred, modified, or reduced to any form, including electronic media, or
transmitted or made publicly available by any means without the prior written
consent of PTC and no authorization is granted to make copies for such purposes.
Information described herein is furnished for general information only, is subject
to change without notice, and should not be construed as a warranty or
commitment by PTC. PTC assumes no responsibility or liability for any errors or
inaccuracies that may appear in this document.
The software described in this document is provided under written license
agreement, contains valuable trade secrets and proprietary information, and is
protected by the copyright laws of the United States and other countries. It may
not be copied or distributed in any form or medium, disclosed to third parties, or
used in any manner not provided for in the software licenses agreement except
with written prior approval from PTC.
UNAUTHORIZED USE OF SOFTWARE OR ITS DOCUMENTATION CAN
RESULT IN CIVIL DAMAGES AND CRIMINAL PROSECUTION.
PTC regards software piracy as the crime it is, and we view offenders accordingly.
We do not tolerate the piracy of PTC software products, and we pursue (both
civilly and criminally) those who do so using all legal means available, including
public and private surveillance resources. As part of these efforts, PTC uses data
monitoring and scouring technologies to obtain and transmit data on users of
illegal copies of our software. This data collection is not performed on users of
legally licensed software from PTC and its authorized distributors. If you are
using an illegal copy of our software and do not consent to the collection and
transmission of such data (including to the United States), cease using the illegal
version, and contact PTC to obtain a legally licensed copy.
Important Copyright, Trademark, Patent, and Licensing Information: See
the About Box, or copyright notice, of your PTC software.
UNITED STATES GOVERNMENT RIGHTS
PTC software products and software documentation are “commercial items” as
that term is defined at 48 C.F.R. 2.101. Pursuant to Federal Acquisition Regulation
(FAR) 12.212 (a)-(b) (Computer Software) (MAY 2014) for civilian agencies or
2
the Defense Federal Acquisition Regulation Supplement (DFARS) at 227.7202-1
(a) (Policy) and 227.7202-3 (a) (Rights in commercial computer software or
commercial computer software documentation) (FEB 2014) for the Department of
Defense, PTC software products and software documentation are provided to the
U.S. Government under the PTC commercial license agreement. Use, duplication
or disclosure by the U.S. Government is subject solely to the terms and conditions
set forth in the applicable PTC software license agreement.
PTC Inc., 121 Seaport Blvd, Boston, MA 02210 USA
3
Contents
Contents 5
About This Guide
This guide documents the installation and use of the PTC Windchill Rehost
Utility. It contains the following chapters:
• Rehosting Process Overview on page 15
• Planning Rehost Activities on page 34
• Installing the Windchill Rehosting Utility on page 52
• Using the Windchill Rehosting Utility on page 55
• Rehosting Utility Configuration Details on page 75
• Rehosting Scenarios Examples on page 140
• Rehosting Utility Script Examples on page 190
• Manual Rehosting Activities on page 175
This guide is intended for system administrators who are installing the PTC
Windchill Rehost Utility and then using the utility to rename, rehost, move, or
clone an existing Windchill system.
To take advantage of the functionality in the PTC Windchill Rehost Utility, you
must have:
• General system administration and networking knowledge
• General Windchill knowledge
• Knowledge of or access to someone who has knowledge of the database used
by Windchill
• Knowledge of or access to someone who has knowledge of the LDAP servers
that are used by Windchill
7
Date Modified Description of Change
○ List of modified file names:
Old Name Modified Name
rehost_ rehost_
clustermaster.pro clustermain.pro
perties perties
rehost_ rehost_
clustermaster_ clustermain_
vault.properties vault.properties
rehost_ rehost_
clusterslave_ clustersecondary_
first.properties first.properties
rehost_ rehost_
clusterslave_ clustersecondary_
second.properties second.properties
8
Date Modified Description of Change
June 2019 for • Added automated Rehost activities:
11.2 F000
○ Support for Solr rehost script for rehosting Standalone
Solr server and rehosting Standalone Solr server on
Cloud platform.
○ Debugging the Solr Rehost Utility Script.
• PDMEssentials is not supported from 11.2 F000 release
onwards.
December 2018 • Support for Rehost for Pro-Intralink.
for 11.1 M020
June 2018 for • Support for Rehost of PTC System Monitor.
11.1.M010 • Support for Rehost of PDMEssentials.
• Section Various Rehost Scenarios added to the guide.
• Section Rehosting Standalone Solr Server updated to add
information about Rehost and Clone scenarios.
December 2017 • Cognos is not supported.
for 11.1 F000 • Added manual steps for configuring standalone Solr.
• Added updates for additional settings for PSI about WVS
workers.
June 2017 for • File Server is no longer supported:
11.0 M030 ○ Removed a small piece of code related to file server
settings from the rehost_clustermain_vault.properties
section of the Configuration Properties File for Rehost
Cluster Example section.
○ Removed “and file servers” from several locations
throughout the guide.
• Added a note at the end of the Configuration Properties
File for Rename Example section.
• Removed ContainerTemplate module sections until it has
been more thoroughly tested.
• Removed the codebase bullet in the Media Content
section.
9
Date Modified Description of Change
July 2016 for • The following new sections were added:
11.0 M010 ○ What’s New
◆ Discusses changes from 3.0 to 3.0 M010
○ Properties Used By All Modules
◆ Contains both new properties not previously
described in this guide, as well as properties that
were moved into this new section from other areas
• The following sections were removed:
10
Date Modified Description of Change
○ File Server Settings
○ ValidateMount
◆ For Windchill 11.0 M010 and higher, no separate
task is executed for ValidateMount, as it is an in-
built task in the Vault task.
• The following existing sections were updated (some
extensively):
○ Rehost Scenario Process
○ Selecting the Right Scenario
○ Setting Up the Rehost Environment
○ Identifying Activities for Rename
○ Activities when Moving Windchill to a Different
Directory on the Same System
○ Activities when Moving Windchill to a Different
Directory on a Different System
○ Installing the Windchill Rehost Utility
○ Bundled Modules
○ Scenario rehost.useCase Property
○ Where to Run the Utility
○ Log Files for Scenarios
○ Backing Up Artifacts from a Custom Windchill
Environment
○ Apache
○ Copy
○ Cluster
○ InfoEngine
○ Solr
○ Vault
○ LDAP Settings
○ Rehost Additional Adapters
○ Changing Additional Adapters
○ Windchill Path Settings
○ Host Settings
11
Date Modified Description of Change
○ Cluster Settings
○ Installation Registry Settings
○ File Vault Settings
○ Copy Settings
○ Selective Content Settings
○ Solr Settings
○ rename.example Property for Rename Example
○ Configuration Properties File for Rename Example
○ Configuration Properties File for Rehost Example
○ Configuration Properties File for Rehost Cluster
Example
○ Clone Scenario Example
○ Configuration Properties File for Clone Example
○ Configuration Properties File for Move Home
Directory Example
○ Configuration Properties File for Move to New
Platform Example
○ oraexp.bat
○ oraimp.bat
○ windchillStart.bat
• Added new properties and updated many property names
and descriptions all throughout the guide
• Removed support for the DOORS adapter, which was
retired at 11.0 F000
• Updated links to referenced documentation
• Fixed various minor typos
September 25, Updates for Windchill Rehost Utility 3.0 release
2015
June 19, 2014 Initial Windchill Rehost Utility 2.0 release
July 10, 2014 Added references to the 1.0 utility and guide. See Installing
the Windchill Rehost Utility and Using the Windchill Rehost
Utility.
Made minor corrections throughout the guide.
12
Related Documentation
The following documentation may be helpful:
• Windchill Installation and Configuration Guide
• Windchill Upgrade Guide
• Windchill Customization Guide
• Enterprise Deployment Resources Support Policy
Technical Support
The PTC eSupport portal provides the resources and tools to support your
Windchill implementation:
https://support.ptc.com/appserver/cs/portal/
If you encounter problems using this product, contact PTC Technical Support. For
complete details, see “Opening a Case” on the Processes tab of the PTC
Customer Support Guide:
http://support.ptc.com/appserver/support/csguide/csguide.jsp
You must have a Service Contract Number (SCN) before you can receive
technical support. If you do not know your SCN, see “Preparing to contact TS” on
the Processes tab of the PTC Customer Support Guide for information about how
to locate it.
13
http://support.ptc.com/appserver/support/csguide/csguide.jsp
When you enter a keyword in the Search Our Knowledge field on the PTC
eSupport portal, your search results will include information from knowledge base
articles, product documentation, and the PTC community.
Comments
PTC welcomes your suggestions and comments on its documentation:
• To send feedback about a topic you are viewing in the Windchill Help Center,
click the send feedback icon in the top right corner of the topic. The title of
the help topic you were viewing when you clicked the icon is automatically
included with your feedback.
• You can also send an email to [email protected]. To help us more
quickly address your concern, include the name of the PTC product and its
release number with your comments. If your comments are about a specific
help topic or book, include the title.
14
1
Rehost Process Overview
General Rehost Process ............................................................................................16
Various Rehost Scenarios ..........................................................................................18
Rename Scenario Process.........................................................................................21
Rehost Scenario Process...........................................................................................22
Clone Scenario Process ............................................................................................26
Move Scenario Process .............................................................................................29
License Considerations for Rehost Scenarios..............................................................33
15
General Rehost Process
Rehosting consists of the the update of a test or development environment to
account for a change in the system host name. This rehost use case includes the
duplication of the production dataset to test and development landscapes. This
duplication is done to eliminate risk when validating new changes, as well as to
minimize rework in test and development landscapes. By using the Windchill
Rehost Utility, configuration details and data is updated to reflect a change in the
Windchill environment, such as the system host name or platform after copying a
duplicated dataset to test or development landscapes.
The following diagram highlights rehost activities across all landscapes:
Platform is different
Note
Can be categorized as <Type> Scenario
To use the Rename scenario, the next step is to plan the activities for the scenario.
See Planning Rehosting Activities on page 34.
The previous diagram includes a staging area that is used when there is no direct
communication between the source and target systems.
This scenario does not copy Windchill installation files (designated by the file
folders in the diagram); it only updates Windchill configuration files (such as
db.properties) on the target system. To copy a Windchill installation, see the
Clone scenario that is describe in the next section.
Note
In this scenario, the source and target systems are intended to function
simultaneously and independently.
Since both the target main and secondary host names are different from the names
used on the source cluster, the utility must be executed on all nodes in the cluster.
To use the Rehost scenario, the next step is to plan the activities for the scenario.
See Planning Rehosting Activities on page 34.
Note
Before running the Clone scenario, you must set up a database instance to use
with the cloned Windchill system.
The result of cloning is that there can be two Windchill systems (source and
target) that have identical behaviors, each running on a different host. Cloning is
commonly used to rapidly deploy non-virtualized environments such as
environments for Migration Rehearsal, Production Mirror, and Disaster Recovery.
Note
In this scenario, the source and target systems are intended to provide the same
functionality.
The previous diagram includes a staging area that is used when there is no direct
communication between the source and target systems.
Since the source files from all nodes are copied to target nodes and both the target
main and secondary host names are different from the names used on the source
cluster, the utility must be executed on all nodes in the cluster.
To use the Clone scenario, the next step is to plan the activities for the scenario.
See Planning Rehosting Activities on page 34.
In this diagram, the X drawn through the source system indicates that it is no
longer running.
When doing this type of move in a clustered environment, the target
environment must have the same number of nodes available as the source
environment and it is assumed that the host names remain the same. If you are
using the utility to copy software installation directories to new directories on
In this diagram, the X drawn through the source system indicates that it is no
longer running. The target system is updated in place using the IEConf,
database, and configuration information extracted from the source system and
any source files vaults can be copied to the target system.
When doing this type of move in a clustered environment, the target
environment must have the same number of nodes available as the source
environment and it is assumed that the host names used for the source nodes
become the host names for the target nodes. When this is the case, you only
need to run the utility on the main node (when defined) or on one of the nodes
(when no main nodes is defined). There are no changes needed on the other
nodes in the cluster.
If you want to use the Move scenario, the next step is to plan the activities for the
scenario. See Planning Rehosting Activities on page 34.
The following sections shows which scenario and modules to run in the utility to
accomplish rehost projects.
After you have selected the scenario, read the appropriate sections that follow to
determine which modules are needed. Then, create a check list of activities and
property configuration settings.
Note
This scenario assumes that you have a running Windchill environment on a
virtual machine for which you want to change the host name.
Note
When running a Clone scenario, ensure that the OS user name that you use to
run the utility has sufficient permissions to read all files from the staging area
and write to the target system.
The first time you run the Clone scenario in a given situation, the target
environment does not have the Windchill codebase and bundled components
installed. Therefore, you must copy the files from the source or staging
environment to the target environment. This results in the target system having the
same Windchill installation directory as the source. After this initial copy is
complete and the target system is running, it may not be necessary to copy the
codebase again to update the target system. When there are additional changes
made on the source system that do not include the codebase changes, they can be
pushed to the target using a Rehost scenario.
To complete a Clone scenario, accomplish the following activities:
1. Set up a staging area (if needed).
The items that need to be accessible to the target system can include:
• Software directories to copy to the target system. These directories
include:
○ IEConf directory
○ Java installation directory
○ Apache or PTC HTTP Server (for Windchill 10.2) installation
directory
○ Windchill Directory Server installation directory
○ PTC Solution Installer (PSI) installation directory
○ Other directories specific to your environment
• Exported database content from the source database instance.
Note
When the host names of nodes in a cluster are not changing as a result of the
move, the Cluster module is not required.
If any host name is changing, the Cluster module is required.
Execute the ChangeHome module on each server where the Windchill installation
directory has changed, after moving the files. If the directory has changed on only
one of the servers, then execute the ChangeHome module only on that server.
Import database data to a location accessible from all nodes. The imports can
either be done before running the utility or executed as user-defined modules in
the utility.
The Windchill Rehost Utility media is available from the PTC Software Download
page.
The following sections provide information about installing and uninstalling the
Windchill Rehost Utility media.
51
Installing the Windchill Rehost Utility
For Windchill Release 11.1 Onwards
The Windchill Rehost Utility is part of Windchill Installation, separate installation
of the utility is not required. The wcRehost folder can be located under <WT_
HOME>/utilities folder.
Media Content
The Windchill Rehost Utility is deployed as a set of Java classes and configuration
files that are invoked from a batch file (Windows) or shell script (UNIX and
Linux). Additionally, the utility includes a password encryption program that can
be run to set and encrypt passwords that are needed for rehost activities.
Download the media as the wcRehost.zip file. When unzipped, the ZIP file
creates a set of directories that consists of the following set of directories and files:
• conf
The conf directory contains property files and a modules directory as
follows:
○ modules
Contains XML files that are the bundled modules used in rehost activities.
See Using Task Modules on page 61.
○ log4j.properties
Contains the log4j property settings that are used when producing the
debug.log file. For additional details, see Log Files for Scenarios on
page 71.
○ projects.properties
Identifies the modules that are executed for each rehost scenario. Update
this file to define the scenarios you plan to use. For details, see Editing
Contents of projects.properties on page 63.
○ recovery.properties
Identifies the artifacts that are backed up when the utility runs. For details
on the automated backup, see Automatic Backup Activities Performed
when Windchill Rehosting Utility Runs on page 70.
○ rehost.properties
Contains a sample of the configuration properties required in a rehosting
scenario. Use this file to create multiple site-specific files that can provide
reproducible configurations for the scenarios you plan to execute. For
details, see Creating rehost.properties Files on page 66.
Note
Modification of the PTC script engine is not supported.
• lib
The lib directory contains the wcRehost.jar.
• scripts
The scripts directory contains sample Windchill start scripts for Windows,
UNIX, and Linux.
○ windchillStart.bat
○ windchillStart.sh
These scripts can be used as a starting point for a module that starts the
Windchill components. For details on using these scripts, see Script on page
92.
Use the scripts directory to store site-specific scripts you create.
• readme.txt
The readme.txt file describes the contents of the ZIP file and location of
the documentation.
• rehost.bat
The batch file used to run the Windchill Rehost Utility on Windows.
• rehost.sh
The shell file used to run the Windchill Rehost Utility on UNIX and Linux
systems.
Note
Deleting the utility installation directory and other directories does not undo
any changes made to the environment, or remove any passwords that have
been stored in the Windchill keystore.
The rehost process has traditionally consisted of many manual activities that
included command-line execution, direct modification of database tables using
SQL, and the text editing of LDIF files. These activities can still be done
manually. However, understanding which properties, database tables, LDAP
entries, and third-party configurations require changes has become increasingly
complex. This complexity is due to the additional Windchill modules and
capabilities that have been implemented.
The following sections provide details on how to use the Windchill Rehost Utility
3.0 instead of doing the rehost manually.
55
Windchill Rehost Utility Overview
Using the Windchill Rehost Utility simplifies the knowledge and effort needed to
complete a rehost. The utility makes rehost activities more efficient and easy. The
utility automates configuration and database updates, as well as providing a
flexible execution model that allows for varied customer environments and
requirements.
Input Files
Simplification of the knowledge and effort to complete a rehosting process is
accomplished by providing the utility with two types of inputs:
• Senarios
The scenarios are listed in the projects.properties file. Each scenario
property lists the default modules it includes. The utility requires only one
projects.properties file that is reused in all landscapes in a Windchill
deployment and therefore the file name is enforced. The file allows for the
tailoring of execution order, required modules, and custom scripts inclusions
for each scenario. The file also supports any number of defined scenarios.
• Environment-specific configuration information
The environment-specific configuration information needs to be provided in a
configuration file modeled on the default rehost.properties file. This
configuration file contains all environment-specific information for the utility
and must be provided as an argument on the command entered to run the
utility. It is expected that most deployments will require multiple rehosting
configurations and, as a result, the utility is designed to support many different
configuration files for a single Windchill deployment. The file name for
rehost.properties is not hard coded.
The rehost.properties file contains many properties that use the
following standard formats:
○ Properties that start with source.*, target.*, and staging.* are
used for referencing specific host names or paths on source, target, and
staging systems (respectively).
○ Properties that start with rehost.* are used to control the behavior of
the utility.
When an environment-specific need or configuration is not provided by the out-
of-the-box functionality of the utility, custom batch files or shell scripts that can
be included in a scenario can be created. With the inclusion of user-defined
scripts, utility execution in complex or non-standard Windchill architectures can
be automated. See Scripting (later in this topic).
Staging Area
The utility is designed to only affect the target environment, leaving the source
environment unchanged. Many production landscapes are segregated from the test
and development landscapes. This eliminates the ability of the utility to access the
source datasets and configurations. For this reason, the staging area can be used to
provide the utility with access to required content when the source environment is
not directly accessible from the target environment. The staging area can be a
system level directory that the source environment is able to write to and the target
environment is able to read from. PTC recommends using a staging area to store
the data needed during utility execution. For example, include the following in the
staging area.
In situations where the source environment is accessible from the target, the
source can be configured to function as the staging area.
An exception for needing a staging area is when the source and target
environments are the same environments. This is true when renaming or moving
an environment in place.
Scripting
Custom scripts can be written to execute any system-level commands desired. The
script definitions can be direct shell commands, other executables, or references to
shell scripts or batch files. Scripting makes it easy to extend or replace utility
functionality with deployment or environment specific details by requiring only
system administrative knowledge rather than Java development or Windchill-
specific skills.
The following sections provide examples of scripting uses. For details on setting
up and using scripts in the rehost process, see Script on page 92.
Environment Manipulation
Some activities in the rehost process require the Apache, Windchill to be running,
and others require that these components are shut down. Other actions, such as
importing datasets, deleting logs or caches, or disabling notification systems, may
also be required. The utility scripting capabilities allow you to insert user-defined
scripts in the chain of activities so that you can start and stop processes as needed,
or perform other actions. In the utility scripts directory, there are sample start
Using Modules
The Windchill Rehost Utility provides a set of out-of-the-box modules that you
can use to accomplish many rehost activities.
Additionally, you need to identify any tasks that are unique to your site and need
to be run as part of the rehost activity. User-defined modules can be created to
execute scripts and accomplish the tasks.
For a brief explanation of the out-of-the-box modules, see the following section
Bundled Task Modules on page 61.
Each supported scenario uses a core set of modules that can be modified for your
individual use case. The projects.properties file contains the core set of
modules for each supported scenario. For additional details, see Editing Contents
of projects.properties on page 63.
Bundled Modules
The following table describes the modules that are bundled with the Windchill
Rehost Utility. The modules reside in the conf/modules directory where the
Windchill Rehost Utility is installed.
Module Description
Apache Updates the target Apache configuration file to reflect new
host names and host aliases.
For additional details, see Apache on page 77.
Backup Used by the utility to identify the modules in a rehosting
scenario so that existing files on a target system can be
backed up. Include this module, where backup is required.
Module Examples
For examples of how to use the modules, see Rehosting Scenarios on page 140.
Editing Contents of
projects.properties
The out-of-the-box projects.properties file contains sample scenario
properties that identify the default modules used to execute supported rehost
scenarios. The projects.properties file is located in the conf directory
where the Windchill Rehost Utility is installed.
where:
• Specify a scenario name (<scenario>) using one of the supported scenario
names. Supported names are rename, rehost, move, and clone. For
information on the different types of rehost processes, see the sections under
Rehosting Process Overview on page 15.
• Including .<variant> is optional. If included, <variant> creates a
custom sub-case for the scenario. The addition of a scenario variant allows
you to maintain a single projects.properties file for all of your
landscapes. This allows multiple scenarios of each type (rename, rehost, clone,
move) to be configured in a single projects.properties file for
simplified utility deployment and configuration management.
The variant string can be any number of alphanumeric characters; spaces are
not allowed. For example, if you are renaming a Windchill 10 development
system, the property listing the modules for renaming the development system
could be rename.WC10dev.
• <module_list> is a comma-separated list of modules. The order of the
modules in the list determines the execution order with the following
exception, the Copy module always executes first (regardless of where it is
listed).
The following modules can be included:
○ Bundled modules
These modules provide specific actions that PTC has grouped together to
automate changes in the target Windchill environment.
○ User-defined modules
These modules are identified in the list using the bundled Script module.
Each Script module names a user-defined script that allows you to
automate a site-specific rehost activity.
For details on the modules, see Using Task Modules on page 61.
Note
Windchill Bulk Migrator (WBM) is an optional module.
Note
When rehosting a cluster that is running Windchill 10.2 or later, there may not
be a dedicated main node in the cluster. If that is the case, run the utility first
on the node that is currently acting as the main node. Then complete all other
runs as if the nodes were secondary nodes, where database and IEConf
changes are not needed.
• When renaming, first run the utility on the main node (if defined) and then run
it on all secondary nodes as well. This is because host name changes are
required on all nodes in the cluster. Therefore, at least two
rehost.properties files are needed: one for the main (or for first node
on which the utility is run), and one for all secondary nodes. For additional
details, see Identifying Activities for Rename on page 39.
• When rehosting into an existing clustered target, typically execute the utility at
least one time on each node. Only the database and IEConf are modified from
the main (or first) node, but cluster-related properties need to be updated on
each node. For additional details, see Identifying Activities for Rehost on page
41.
Note
The target system database must be running when you run the Windchill
Rehost Utility.
When running the Windchill Rehost Utility from a target environment where
Windchill is installed, the utility can be executed from within a Windchill shell.
Open the shell, navigate to the directory where the Windchill Rehost Utility is
installed. Then enter the command to run the Windchill Rehost Utility.
When running the Windchill Rehost Utility where the target system does not have
Windchill installed, start the utility from a command prompt where you have the
access you need. For example:
• When copying Windchill software to a target system, the utility with a user
that has write access to the directory where the files will be copied.
• When updating a WVS worker start file from a server where Windchill is not
installed, please manually update the start files of workers with updated
Windchill server hostname.
Navigate to the directory where the Windchill Rehost Utility is installed and enter
the command to run the Windchill Rehost Utility using the following syntax.
where:
<rehost.properties_file> is the file path to the configuration property
file that contains the setting for this rehost scenario. Although you can use any
name for the file, the documentation usually uses rehost.properties as the
configuration property file name. When a partial path is specified, the utility
assumes that the path specified is under the top-level directory where the
Windchill Rehost Utility is installed.
Instead of using plain text passwords in a rehost.properties file, the value
can be specified as $encrypt and then entered at the command line when the
rehost utility is executed.
After successfully running the Windchill Rehost Utility, save the startup command
and all artifacts used in the run. This allows the utility to be rerun or automated for
future use.
You can also run the Windchill Rehost Utility as a UNIX cron job. For example,
include the following .crontab entry to run the utility every Sunday at
midnight:
0 0 * * 0 /ptc/Windchill/rehost/rehost.sh conf/rehost.properties
For examples of setting up the required files and running the Windchill Rehost
Utility, see the examples in Rehosting Scenarios on page 140.
The InfoEngine entries indicate that the utility will back up IEConf entries and
selected files. There are no database tables to back up.
Out-of-the-box, there is no automatic backup done on artifacts that will be
changed when the Windchill Rehost Utility runs user-defined modules. For
example, database tables that will change as a result of importing database data in
a user-defined module are not backed up before the utility executes modules. A
full backup should be created before running the utility or as a user-defined
module as the first action in the scenario.
Automatic backup activities occur at the beginning of the run. Notification that the
activities are occurring display in the command window with the [backup]
prefix and are captured in the utility log file. Each affected configuration file,
database table, and IEConf entry is backed up before any supported modules run.
The utility determines what to back up by inspecting the list of modules that will
run. The affected files, database tables, and IEConf entries are documented with
each module description in Rehosting Module Descriptions on page 76.
The backed-up tables are named using the following format:
<name>_rhbak
Backup files are stored in the backups directory under the Windchill Rehost
Utility installation directory. The name of the directory for a particular run has the
following format:
<scenario>.<variant>-<date>_<time>
Execution Results
Each rehost scenario has unique results. General results for each scenario are as
follows:
• Results from running the Rename scenario are that the host name change has
been completed in the Windchill application and the application is functional.
In this case, there is only one system that is both the source and target.
• Results from running the Rehost scenario are that:
○ The Windchill application configuration changes that were required to
make the data usable on the target system have been made.
○ A dataset has been copied from the Windchill application on the source
system to the target system.
The dataset could include actual files with content or just stub files.
• Results from running the Clone scenario are that the Windchill software and a
dataset have been copied from the source system (using the staging area) to
the target system. On the target system, the copy replaces any Windchill
Note
Customers may customize the recovery.properties file, but do so at
their own risk.
Prerequisites
When running the Windchill Rehost Utility, you must execute the Backup task.
Codebase Recovery
You can directly run recovery.bat for Windows and recovery.sh for
Linux environment from the scripts folder. Alternatively, you can use the
rehost utility Script module to run the recovery script. For more information on
the Script module, refer to Script on page 92.
Note
Recovery script uses the latest backup folder from the backup directory for
restoration.
Database Recovery
For database recovery, follow these steps:
1. In the projects.propeties file,
a. Add Restore task as a first module.
b. Remove the Backup module.
Note
Windchill Rehost Utility executes only the Restore task and then exits
automatically. It does not execute the subsequent modules from the
projects.properties file.
When setting up for a rehost scenario, decide which modules to use and set the
appropriate rehost properties before running the utility.
The following sections provide information about the rehost modules and
configuration properties used by the Windchill Rehost Utility.
75
Rehost Module Descriptions
The following sections provide details about using the modules bundled with the
Windchill Rehost Utility. The modules reside in the conf/modules directory
where the Windchill Rehost Utility is installed.
Note
Before proceeding with rehosting tasks, if a server is configured with SSL,
then you need to generate new certificates and configure it on the new
machines for the rehost scenarios namely, Rename, Rehost, Clone and Move
to a different machine.
Use the Apache module to update the target Apache configuration file to reflect
new host names and host aliases.
Note
In Windchill 10.2 and later releases, the web server bundled with Windchill is
named the PTC HTTP Server (powered by Apache). Use the Apache module
to update the PTC HTTP Server configuration file. Throughout the guide,
references to Apache also apply to the HTTP Server.
Required Properties
A value for the target.wc.hostname and
target.directory.httpserver properties must be set in the
rehost.properties file that is specified when running the Windchill Rehost
Utility.
Optional Properties
If values for the following properties have changed the Apache module should be
run:
cluster.main.gateway
source.directory.httpserver
source.directory.windchill
source.local.domain
source.wc.webapp
target.directory.windchill
target.httpserver.port
target.httpserver.ssl.port
target.ldap.serviceName
target.ldap.hostname.*
Optional Properties
If values for the following properties have changed, the ChangeHome module
should be run:
source.directory.httpserver
source.directory.java
source.directory.psiBase
source.directory.windchill
target.directory.httpserver
target.directory.java
target.directory.psiBase
target.directory.windchill
Note
To run this module, correct permissions are required to create the target
directory for Windchill and to read the directories and files that are in the
staging area.
The Copy module is designed to run in an empty computer environment that does
not have Java, Windchill, or Ant installed. Use this module, to specify directories
and files to be copied.
Note
When included in a rehost scenario, the Copy module always runs first
regardless of where it appears in the list of modules identified for the scenario.
This means that the Copy module runs before any user-defined modules.
To set up your environment before copying files, perform one of the
following:
• Do the set up outside of the utility before running the rehost utility.
• Run the rehost utility two times:
1. Do the setup that is required using the utility. This can usually be done
through one or more user-defined scripts.
2. Copy directories and files using the Copy module, and then execute
any other modules for the scenario.
Note
No changes are made to the files that are copied as a result of executing this
module.
Note
Windows UNC paths require adding an additional backslash (\) as an escape
character at the beginning of the path. For example:
staging.directory.windchill=\\\mcsrc.src.domain\ptc\Windchill_10.2\Windchill
Note
This module is required when changing the host names of nodes in a
Windchill cluster and must be run on the main node (if defined) before
running it on secondary nodes. On the secondary utility runs, set
cluster.secondary.rehost=true.
If all nodes can be the main node (as can be the case in clusters using
Windchill 10.2 or later), then run the utility (including Cluster) on one of the
nodes to update IEConf and database data as well as the cluster properties.
Then execute the Cluster module on all other nodes to update host names in
cluster properties on those nodes.
When the Apache module is included in the scenario, place the Cluster module
after the Apache module.
Required Properties
Before executing Cluster, set values for the following properties in the
rehost.properties file that is specified when running the Windchill Rehost
Utility:
cluster.main.gateway
cluster.secondary.hostnames
target.wc.hostname
For property details, see Cluster Settings on page 116.
Required Properties
For property details, see Vault on page 96.
Required Properties
Note
Running this module requires that the database is running and that a valid
database user name and its password are stored in the
rehost.properties file. Use the target.db.username and
target.db.password properties to store those values.
Optional Properties
cluster.main.gateway
source.wc.webapp
source.local.domain
target.ldap.renameAdapter
target.ldap.serviceName
target.directory.windchill
target.wc.hostname
target.wc.organization
target.wt.home
cluster.secondary.rehost
For property details, seeDatabase Settings on page 112, Windchill Path Settings
on page 114, Host Settings on page 115, and Cluster Settings on page 116.
Required Properties
Before executing InfoEngine, values for the following properties must be set in
the rehost.properties file that is specified when running the Windchill
Rehost Utility:
cluster.secondary.rehost
target.directory.windchill
target.ldap.hostname.*
target.ldap.password.*
target.ldap.port.*
target.ldap.username.*
Optional Properties
cluster.main.gateway
source.directory.windchill
target.ldap.IEConfDir
source.local.domain
source.wc.webapp
target.ldap.deleteAdapter
target.ldap.scheme.*
target.ldap.serviceName
target.ldap.renameAdapter
target.ldap.setAdapterAttributes.*
target.directory.windchill
target.wc.hostname
target.wc.webapp
Required Properties
Before executing QueueMgmt, set values for the following properties in the
specific rehost.properties file:
rehost.queue.name.<n>
rehost.queue.enabled.<n>
rehost.queue.clear.<n>
For property details, see Queue Settings on page 130.
Restore
Use the Restore module to roll back the changes made by the Windchill Rehost
Utility. The Restore module offers an automated mechanism to restore the
changes in Windchill application on a target system.
To perform the Restore operation, you can add a set of DB_BAK tables as per your
requirement to the recovery.properties file. For more details on how to
run a recovery, refer to Recovery Using Windchill Rehost Utility Backups on page
73.
Note
There are no additional properties required for the Restore operation.
Syntax
Use the following syntax for the Script module entry on the scenario modules
property in projects.properties:
Script:<module_name>
where:
<module_name> is a unique module name. The specified name must match a
corresponding script.<module_name> property in
rehost.properties. In that property, specify the name of a script file in the
scripts directory where the Windchill Rehost Utility is installed.
Required Property
The property and its value identify the module name and script file name as shown
in the following format:
script.<module_name>=<script_file_name>
Example
If the scenario requires that Windchill is started a user-defined module to start
Windchill must be created. PTC provides a sample windchillStart.sh file
and windchillStart.bat file in the utility scripts. The documented
examples include start files to use as a model for the required module. See User-
defined Scripts for Rename Example on page 142 and User-defined Scripts for
Rehost on page 147.
Execute the script by naming it in a Script module and setting the script file name
in the rehost.properties file used when the Windchill Rehost Utility is run.
For example, put the mywcstart.sh file in the scripts directory where the
Windchill Rehost Utility is installed. Then include the following entry in the
rehost.dev property in projects.properties:
Script:WindchillStart
Vault
Use the Vault module to update file vault mounts on the target system and, either
copy file vault content to the target system or create stub files. Whether vault
content is copied depends on the setting of the target.fv.required
property and the settings of *.fv.path properties.
Running the Vault module completes the following steps on the target system:
1. Reconfigure vault mounts.
2. Validate the mounts.
3. The next step depends on whether the mounts are valid:
• When a mount is valid, the module completes one of the following:
○ Copy content from the directories that have been specified for that
mount when target.fv.required=true.
○ Generate empty stubs for the files in those same directories when
target.fv.required=false.
• When a mount is not valid, the module generates an error that is displayed
at the console and is entered into the log file. No file content or stub files
can be created for the mount when it is not valid.
Check your target system setup and the rehost property values to determine
the issue. After fixing the issue, rerun the Vault module so that it can
complete successfully.
For additional information about copying vaulted content to the target system see
Copying Content from Source to Target Using Vault on page 122.
For additional information about generating empty stubs on the target system, see
Creating Stub Files on Target Using Vault on page 124.
To include only selected file content on a target system, execute both the Vault and
SelectiveContent modules as describe in SelectiveContent on page 95.
Required Properties
Before executing Vault, values for the following properties must be set in the
rehost.properties file that is specified when running the Windchill Rehost
Utility:
source.fv.path.<n>
staging.fv.path.<n>
target.fv.path.<n>
target.fv.required
source.fv.hostname.<n>
target.fv.hostname.<n>
target.db.*
For property details, see File Vault Settings on page 120.
Note
Running the WVSAgent module only updates the host name. It assumes that
the source and target environments have the same path to the worker start file
(such as proeworker.bat) and that the workers in both environments are
set up to use the same worker ports, user names, and passwords (needed for
ftpuser).
When WVS workers are located on Windchill cluster nodes or file servers and
there is a change in Windchill host names, you must run WVSAgent on all target
Windchill hosts in the environment.
Note
Do not run the WVSAgent module on the system where workers are installed.
When there is a change in the host name of the Windchill system, please
manually update the start files of workers with updated Windchill server
hostname.
Required Properties
Before executing WVSAgent, values for the following properties must be set in
the rehost.properties file that is specified when running the Windchill
Rehost Utility:
target.wt.home
source.worker.host.<n>
target.worker.host.<n>
For property details, see Windchill Path Settings on page 114 and WVS Agent
Settings on page 139.
RehostWAUtility
The Windchill Performance Advisor Utility, also known as RehostWAUtility,
checks if a repository with the name PTC_WNC_Internal exists. If it exists,
Windchill Performance Advisor (WPA) updates the record in the database table. If
not, it generates a new record in table automatically. The record helps to identify
the Windchill server that is running.
Optional Properties
Before executing Windchill Performance Advisor, set value for the following
property in the rehost.properties file that is used when running the
Windchill Rehost Utility:
target.wpa.guid=WPA.myCompany.com
If the Windchill Performance Advisor Utility is executed without setting the above
property, a default value is assigned as the GUID for the repository.
Required Properties
target.wbm.stg.db.url
target.wbm.stg.db.type
target.wbm.stg.db.user
target.wbm.stg.db.password
target.wbm.stg.db.protocol
target.wbm.stg.db.sourceOption
Note
• You need to configure the optional properties
target.wbm.stg.db.nameList and
target.wbm.stg.db.valueList only when the value of the
required property target.wbm.stg.db.protocol is set to tcps.
• You need to configure the optional property
target.wbm.stg.db.optionalModules only when the value of
the required property target.wbm.stg.db.sourceOption is set to
Optional, else you can leave it blank.
Note
• When entering property values in the configuration property files, it is not
necessary to escape colon and backslash characters with \.
If an equal sign is used in a property value, the equal sign in the property value
can but does not need be escaped using the backslash character. For example,
either of the following is processed correctly:
target.ldap.username=cn\=Manager
target.ldap.username=cn=Manager
Linux platform:
target.ldap.username=cn=Directory Manager
The configuration properties needed for a rehost scenario are determined by the
modules included in a specific scenario (as defined in the
projects.properties file). For a list of required properties by module, see
Rehosting Module Descriptions on page 76.
For examples that show the use of a specific set of properties, see Rehosting
Scenarios on page 140.
The following sections describe the properties that can be set, grouping the
properties according to the organization in the rehost.properties sample
file.
Note
Specify one, and only one, rehost.useCase property in each
rehost.properties file.
rehost.keystore.clear
Removes any rehost related values from the Windchill keystore when a
scenario is successfully completed.
rehost.log.passwords
Logs raw command calls. This leaks plaintext passwords to the log, but is
useful for troubleshooting.
test.prop.values.only
Validates the properties file to see if all required values have been set for the
selected modules, without making any changes.
Note
If the ie.ldap.serviceName property is explicitly set in
<Windchill>\codebase\WEB-INF\
ieStructProperties.txt on the target, then it must either be unset,
or set to the same value used in target.ldap.serviceName. If
ie.ldap.serviceName is set to a different hostname. then, it may
cause problems starting or running Windchill. For more information, see
target.ldap.*.
target.ldap.scheme
Set or change the protocol (LDAP or LDAPS) for the target LDAP server; for
example, target.ldap.scheme.<adaptername>=ldap.
Note
The above set of properties are optional. However, configuring the
source.local.domain property in the rehost.properties file is
mandatory.
Note
Both source and target database platforms must be the same.
When the database specified is a Microsoft SQL Server database, a valid value
for the target.db.jdbc.database property is required.
source.directory.base
The full directory path to the PSI directory on the source Windchill system.
The PSI base path for Windchill 10.0 and later systems usually ends with
"PSI".
Windows example:
source.directory.base=d:\ptc\Windchill_10\PSI
target.fv.path.<n>
The full directory path to the directory where files in a file vault will be stored
on the target. The Vault module uses this vault information when creating the
target directories and updating the folder mount information stored in
Windchill Site ▶ File Server Administration ▶ Vault Configuration.
Note
The user who runs the utility must have permission to create the target
directories.
target.fv.required
Controls the module behavior related to copying file vault content. The value
of the property determines whether content is copied from a staging area to the
target system. Specify either true or false:
• True—Allows the module to copy source vault content from a staging
area to the target system.
For additional details, see Copying Content from Source to Target Using
Vault on page 122.
• False—Does not allow the module to copy file vault content. Instead,
the module generates empty stub files. The main use case for generating
stub files is to replicate a system for testing that does not need the actual
file content. This rehosted target system requires less disk space.
Note
For remote file servers, the creation of stub files through the Windchill
Rehost Utility is not supported.
For additional details, see Creating Stub Files on Target Using Vault on
page 124.
To save disk space on the target system and significantly reduce the time it
takes to run the utility, specify false when vault content is not required.
Note
The following discussion assumes that the following property is set:
target.fv.required=true
Note
The following discussion assumes that the following property is set:
target.fv.required=false
The Windchill Rehost Utility can be used to create stub files a target system in a
monolithic environment or an environment set up for a main server.
Note
PTC does not support the use of the Windchill Rehost Utility to create stub
files on a remote file server site because stub file creation requires database
access, which remote file servers do not have.
where:
• <module_name> is a unique module name. The name must match the name
entered on the Script entry specified on the corresponding
<scenario>.<variant> property in the projects.properties file.
• <script_file_name> is the file name of the script to use in this module.
The script file must reside in the scripts directory where Windchill Rehost
Utility is installed.
For example, to use a database import script named dbimp.sh in the scripts
directory, as a module named dbimport, in a scenario named rehost.test,
complete the following activities:
• Add the following property to the configuration property file that will be used
to execute the rehost scenario (such as conf\rehost_to_
test.properties):
script.dbimport=dbimp.sh
Save any changes, then execute the rehost scenario on a Windows system by
opening a command prompt, navigating to the directory where Windchill Rehost
Utility is installed, and entering:
rehost.bat conf\rehost_to_test.properties
The dbimport module is then executed along with all other modules in the order
specified in the rehost.test property.
Note
To use Windows UNC paths, an additional backslash (\) is needed to escape
the beginning of the path. For example:
staging.directory.windchill=\\\mcrsrc.src.domain\ptc\Windchill_10.2\Windchill
One option is to use an export action available from the Folders Actions menu
on the source system to create a file with the names (and other details) of the
objects in a given folder. Using the file, populate
target.content.assembly.filename.<n> properties for those files
to be included as content on the target system.
target.content.assembly.version.<n>
Specify the version number associated with the file.
If not specified, the latest version is used. Default is “Latest”.
target.content.assembly.configspec.<n>
Specify one of the following configuration specification settings:
• As Stored (default)
target.content.assembly.includesource.<n>
Decide whether to include source business objects that are related to the
assembly:
• Enter true to include all related source business objects.
• Enter false not to include the related source business objects. (default)
target.cleanup.metadata.unselectedAssemblies<n>
Specifies the flag for cleaning up metadata for the unselected assemblies.
Default value is false.
When set to true, cleans up the metadata for unselected assemblies from
Windchill.
target.directory.windchill=D:\PTC\Windchill10\Windchill
Note
For domain name change scenario, set rename adapter properties, as
mentioned in Changing Additional Adapters on page 111.
The following sections provide detailed information about rehost activities that
must be done outside of the Windchill Rehost Utility.
175
Planning Rehost Project Activities
The following sections shows which scenario and modules to run in the utility to
accomplish rehost projects.
Note
PTC recommends that the source schema user name be used as the target
schema user name.
Example BAT and SH scripts are provided as a starting point for running the
Oracle Data Pump utility:
• If the database resides on Windows, see oraexp.bat on page 192 and oraimp.
bat on page 192.
• If the database resides on UNIX or Linux, see oraexp.sh on page 197 and
oraimp.sh on page 199.
For more information about the Oracle Data Pump utility or to use a different
target schema user name, see the Oracle example for exporting and importing data
that is documented in the Windchill Upgrade Guide, which can be found at ptc.
com: .https://www.ptc.com/appserver/cs/doc/refdoc.jsp.
179
Automated Solr Rehost
About Solr Rehost Utility
The Solr rehost utility is an automated script that you can use to perform Solr
rehosting activities on the same machine or on different machines. Using the
utility, you can perform all four rehost scenarios, namely Move scenario, Clone
scenario, Rename scenario and Rehost scenario, automatically for Solr
applications.
After Solr is installed, the utility is saved at:<Solr_home/solr_
utilities/solr_rehost_utility>.
The solr_rehost_utility folder contains the following files:
• solr_rehost.properties: contains property files that can be
configured as per business requirement. Execute the Solr rehost utility script
after modifying or configuring the property settings in this file.
• solrrehostwin.bat: executable file that is required for the execution of
rehost utility script on Windows platform.
• solrrehostunix.sh: executable file that is required for the execution of
rehost utility script on Unix platform.
About solr_rehost.properties:
The solr_rehost.properties file broadly consists of following sections:
1. Target Solr Properties:
Update the following mandatory properties for target Solr server:
SCENARIO=<Specify the rehost scenario to be used:
Rename, Rehost, Move, Clone>
JAVA_HOME=<Specify java home path in target Solr
machine>
HOST_NAME=<Specify host name of target machine>
SOLR_HOME=<Specify Solr home directory>
SOLR_DATA_DIR=<Specify Solr indexed data directory>
2. Properties to copy Solr from source system to target system:
These are optional properties. Update the following properties to copy Solr
from source system to target system.
SOLR_COPY_REQUIRED=<YES>
COPY_SOLR_SOURCE=<Specify Solr source directory>
COPY_SOLR_DEST=<Specify Solr target directory>
3. Properties to copy Solr indexed data from source system to target system:
Note
The instructions in the following sections apply to rehosting a standalone Solr
server on Cloud as well as On-Premise platforms.
Note
• You must have four core indexes in the target data folder of the newly
installed Solr server at the target system.
• Specify YES or NO as values for the properties for Solr configurations as
per business requirement. The property values are case sensitive, use
uppercase only.
Note
You must use Solr Rehost Utility instead of Windchill Rehost Utility to copy
the Solr data completely from source to target system.
Follow this procedure to perform Solr Clone scenario on a Standalone Solr server:
1. Copy the Solr data directory to the target system using the following options:
• Manually copy Solr indexed data to target system.
• Automatically copy the Solr installation and Solr indexed data to the target
system by updating the following properties in solr_
rehost.properties file:
○ Properties to copy Solr installation from source system to target
system.
SOLR_COPY_REQUIRED=YES
COPY_SOLR_SOURCE=<source_solr_path>
COPY_SOLR_DEST=<target_solr_path>
○ Properties to copy Solr data directory from source system to target
system.
INDEX_DATA_COPY_REQ=YES
INDEX_DATA_SOURCE=<source_index_data_path>
INDEX_DATA_TARGET=<targetindex_data_path>
Note
◆ Update these properties in the solr_rehost.properties file
only if your Solr data directory is at a location other than default
location in the source system and you want to copy it to target
location.
◆ Specify YES or NO as values for the properties for Solr
configurations as per business requirement. The property values are
case sensitive, use uppercase only.
Note
• You must have four core indexes in the target data folder of the newly
installed Solr server in the target system.
• Specify YES or NO as values for the properties for Solr configurations as
per business requirement. The property values are case sensitive, use
uppercase only.
The following sections provide examples of common rehost utility scripts that can
be modified to fit unique environments. The scripts are grouped by OS: Windows
systems scripts, and UNIX/Linux system scripts.
Using user-defined shell scripts or batch files within a rehosting utility can be
accomplished by using the utility Script task module. For details, see Script on
page 92.
Before using any of the example scripts, inspect them to ensure that the variables
and file paths that are set are applicable to your environment. When creating your
script files, make sure that any lines copied from the guide do not have extraneous
line breaks. Remember that long script lines that are in the guide have been split
into multiple lines so that they fit on the page.
apstart.bat
Use a script similar to the following script to start Apache:
:: modify vars as needed
set APACHE_HOME=D:\PTC\Windchill10\Apache
apstop.bat
Use a script similar to the following script to stop Apache:
:: modify vars as needed
set APACHE_HOME=D:\PTC\Windchill10\Apache
set SCHEMA_SID=wind10
set SCHEMA_USER=wcadmin
set SCHEMA_PASS=wcadmin
set SYSTEM_PASS=Manager2
set DUMP_DIR=dmpdir
Make any adjustments to the script to fit your environment; for example, use the
existing DATA_PUMP_DIR instead of dmpdir:
DATA_PUMP_DIR = %ORACLE_INVENTORY%\..\admin\wind10\dpdump/ data_pump.sql
oraimp.bat
Use a script that is similar to the following script (which has been formatted to fit
the page) to import a dump file into any Oracle database. Set the correct schema
SID, user, and two passwords in the script. The script assumes that the dump file
is located in the defined dump directory.
:: modify these as needed
set ORACLE_HOME=D:\PTC\oracle\product\11.2.0\dbhome_1
set SCHEMA_SID=wind10
set SCHEMA_USER=wcadmin
set SCHEMA_PASS=wcadmin
set SYSTEM_PASS=Manager2
set DUMP_DIR=dmpdir
:MOVEFILES
move /Y %WT_HOME%\logs %STAGING%\logs_old
move /Y %WT_HOME%\tasks\codebase\com\infoengine\compiledTasks
%STAGING%\compiledTasks_old
mkdir %WT_HOME%\logs
mkdir %WT_HOME%\tasks\codebase\com\infoengine\compiledTasks
Note
Windchill only needs to be started using a script for the SelectiveContent
module.
Use a script similar to the following script to start Windchill from a Windows
system.
Note
The windchillStart.bat file as documented here is included in the
scripts directory where the utility is installed.
The script starts Apache using httpd.exe. Then it calls the Windchill start
command and waits until Windchill has completed startup before proceeding to
execute any additional modules. The wait is accomplished by first waiting one
hundred twenty seconds.
The variables used in the script are set in the utility when run on a Windows
system and can be used as shown in the script.
windchillStart.bat (formatted to fit on the page):
rem apache.home, classpath, wt.username, and wt.password env vars are set by
the rehost utility
start %apache.home%\bin\httpd.exe
windchill start
rem ping for 120 seconds for MethodServer to start - increase this if necessary, or decreas
ping 127.0.0.1 -n 120 > nul
windchill stop
apstart.sh
Use a script similar to the following script to start Apache:
#!/bin/sh
apstop.sh
Use a script similar to the following script to stop Apache:
#!/bin/sh
oraexp.sh
Use a script that is similar to the example oraexp.sh script to export the
Windchill schema from your source Oracle database to a dump file.
To do the export, the person running the script must be a user with database
administrator (DBA) privileges and the user who installed Oracle must have read
and write access permissions to the dump directory specified in the script DUMP_
DIR variable. Also, the script must set the correct schema SID, schema user, and
two passwords:
• SCHEMA_PASS is the password of the scheme user.
• SYSDBA_PASS is the password of the user running the script (the DBA).
The example script calls the data_pump.sql file. The details on that file are
provided in the data_pump.sql subsection after the example.
The script assumes that the dump file is created in the dump directory defined by
DUMP_DIR. If a staging directory exists with the required permissions, set
DUMP_DIR to that directory (for example, /misc/staging).
Example oraexp.sh script (formatted to fit the page):
#!/bin/sh
SCHEMA_SID="wind1"
SCHEMA_USER="wcadmin"
SCHEMA_PASS="wcadmin"
SYSDBA_PASS="Manager2"
DUMP_DIR="dmpdir"
Make any adjustments to the script to fit your environment. For example, use the
existing DATA_PUMP_DIR instead of dmpdir:
DATA_PUMP_DIR = $ORACLE_INVENTORY/../admin/wind10/dpdump/
data_pump.sql
The following SQL statements create a suitable staging area:
CREATE OR REPLACE DIRECTORY dmpdir AS '/misc/staging';
GRANT read, write ON DIRECTORY dmpdir TO wcadmin;
Note
The imported schema that is a result of running this script can have invalid
Oracle packages. Verify all Oracle packages after the utility has concluded and
recompile any invalidated packages.
SCHEMA_SID="wind1"
SCHEMA_USER="wcadmin"
SCHEMA_PASS="wcadmin"
SYSDBA_PASS="Manager2"
drop_user.sql
The following SQL statement drops user “wcadmin”:
drop user wcadmin cascade;
create_user.sql
The following SQL statements create user “wcadmin” (formatted to fit the page):
create user wcadmin identified by wcadmin default tablespace USERS
temporary tablespace TEMP quota unlimited on USERS;
grant connect, resource, create sequence, create view, query rewrite wcadmin;
mv $WT_HOME/logs $STAGING/logs_old
mv $WT_HOME/tasks/codebase/com/infoengine/compiledTasks
$STAGING/compiledTasks_old
rm -rf $STAGING/logs_old
rm -rf $STAGING/compiledTasks_old
$WT_HOME/ant/bin/ant -f $WT_HOME/codebase/MakeJar.xml
mkdir -p $WT_HOME/logs
mkdir -p $WT_HOME/tasks/codebase/com/infoengine/compiledTasks
Note
The windchillStart.sh file as documented here is included in the
scripts directory where the utility is installed.
The script starts Apache and then calls the Windchill start command and waits
until Windchill has completed startup before proceeding to execute any additional
modules. The wait is accomplished by executing a sleep command.
The variables used in the script are either obtained from the utility or set in the
script.
windchillStart.sh (formatted to fit on the page):
#!/bin/bash
# apache_home env variable is set by the rehost utility
$apache_home/bin/apachectl start
windchill start
windchillStop.sh
Use a script similar to the following script to stop Windchill from a UNIX or
Linux system.
The script calls the Windchill stop command. Execute this script before executing
modules that require that Windchill not be running.
The variables used in the script are either obtained from the utility or set in the
script.
windchillStop.sh:
#!/bin/bash
# required variables are set by the rehost utility
windchill stop
where:
<property_file> is the full file path of a file that has each property
<name>=<value> pair to be set. Enter each pair on a single line.
<target_prop_file> is the path of the Windchill property file where the
resulting properties are set.
For additional information about the xconfmanager utility, see "About the
xconfmanager Utility” in the Windchill Help Center.
Depending on which rehost scenario is being executed, there may be site-specific
properties that need to be set on the target system. For example, properties specific
to the target system can be automatically set by entering them in the property file
included in the xconfmanager command described previously.
For example, some sites may want to include the wt.auth.trustedHosts
property. This property is used for setting trusted clients that are local to the server
host.
Note
Embedded database installation on a target machine is a prerequisite for Move,
Clone and Rehost scenarios. Migrating an embedded database from a source
system directly to target system is not supported. The migration can be
achieved by importing or exporting the database.
205
Supported Rehosting Scenarios
• Cloning
If a Windchill system with a configured PSM agent is cloned, the PSM agent
continues to work with the cloned system. However, all cloned systems point
to the same system profile and you cannot view reliable data in PSM. If you
make multiple clones, each Windchill clone should point to the unique system
profile for that Windchill clone, in PSM. Monitoring cloned systems is as
effective as monitoring multiple Windchill environments. For more
information, refer to the Monitoring Two Different Versions of Windchill
Applications topic in the PTC System Monitor Administration and Usage
Guide – Windchill.
• Moving
When the Windchill source and target systems are located on different
platforms, uninstall the PSM agent from the source system, and then perform
the move scenario. After completing move, reinstall the PSM agent on the
target system.
To view historical data that is stored after a Windchill system is rehosted, cloned,
or moved, store the entire data as a session and export the session to the desired
location. The stored session can be used to import on the PSM client.
To view historical data which is stored as sessions, perform the following:
• Right-click System Profile and select Session Storage ▶ Export Session.
• Right-click Session Storage and select Import Session.
For more information, refer to Exporting an Entire Session section in the PTC
System Monitor Administration and Usage Guide – Windchill.