Summary: this page provides information about how to move existing schemas to a new CAST Storage Service/PostgreSQL instance, whether on the same host server or on a different host server. |
If you have CAST AIP schemas installed on CSS/PostgreSQL "InstanceA" and need to move them to CSS/PostgreSQL "InstanceB" whether the two instances are on the same host server or are on a different host servers, you can be complete this action using the following methods:
Run on OS | Source database host OS | Target database host OS | Schemas supported | Post transfer actions required? | Notes | |
---|---|---|---|---|---|---|
CombinedTransfer.bat | Windows only | Windows/Linux | Windows/Linux | Combined only (Analysis, Dashboard, Management) | No | Recommended method. |
CSS Backup and Restore Tools | Windows only | Windows/Linux | Windows/Linux | Analysis, Dashboard, Management, Measure | Yes - update connection profiles/naming | Recommended method. |
CSS Upgrade Wizard | Windows only | Windows/Linux | Windows/Linux | Analysis, Dashboard, Management, Measure | Yes - update connection profiles/naming | Deprecated starting CAST AIP 8.3.25. Please use an alternative method. |
PostgreSQL pg_upgrade tool | Windows or Linux | Windows/Linux | Windows/Linux | Analysis, Dashboard, Management, Measure | Yes - update connection profiles/naming |
|
|
This method functions for installations of CSS on Windows and PostgreSQL on Linux but can only be run from Windows. It is a wrapper batch file for the CSS Backup and Restore Tools, provided as part of the CAST AIP ≥ 8.3.x, and involves a fully automated process of dumping the required schemas to file and then restoring the dumps on the new server. The CAST Storage Services/PostgreSQL instances can be located on the same host server or on two different host servers, and the batch file can be run on a server which is remote to the CAST Storage Service/PostgreSQL instances, or on the same server.
The CombinedTransfer.bat batch file is located in the following folder and must be executed from within the context of this folder:
<CAST AIP installation>\CSSAdmin\CSSUpgrade\ |
Parameter | Mandatory? | Description | |
---|---|---|---|
-mngt_list | Specify the name of the Management schema you would like to move. The associated Analysis and Dashboard schemas will be moved automatically. You can specify multiple Management schemas using a comma separated list - this list must be enclosed in quote marks. For example:
| ||
-logpath | Log Locations [%ProgramData%\CAST\CAST\Logs\CombinedTransfer] | ||
-sourcehost | CSS/PostgreSQL Source Host [localhost]. Ensure you change this to a host name or IP address. | ||
-sourceport | CSS/PostgreSQL Source Port [2280] | ||
-sourcedatabase | CSS/PostgreSQL Source DB [postgres] | ||
-sourceusername | CSS/PostgreSQL Source Username [operator] | ||
-targethost | CSS/PostgreSQL Target Host [localhost]. Ensure you change this to a host name or IP address. | ||
-targetport | CSS/PostgreSQL Target Port [2280] | ||
-targetdatabase | CSS/PostgreSQL Target DB [postgres] | ||
-targetusername | CSS/PostgreSQL Target Username [operator] | ||
-workingDir | Backup Processing Location [%TEMP%\CAST\CAST\$CAST_MAJOR_VERSION$.$CAST_MINOR_VERSION$\YYYYMMDDhhmmssCombinedTransfer\] | ||
-promptpassword | Prompt for CSS/PostgreSQL operator user password [Y]. Possible values are Y or N. | ||
-overwrite | Delete and recreate schema if exists in Target DB [N]. Possible values are Y or N. | ||
-deletefromsource | Delete Schemas from Source DB [N]. Possible values are Y or N. The default behaviour is to perform a copy. If you do not want to retain the schemas on the source server, use this parameter. |
The following will show a password prompt for the CSS/PostgreSQL operator user passwords during the process:
CombinedTransfer.bat -mngt_list [management_schema_name/s] -logpath [loglocation] -sourcehost [hostname] -sourceport [port_number] -sourcedatabase [database_name] -sourceusername [user_name] -targethost [hostname] -targetport [port_number] -targetdatabase [database_name] -targetusername [user_name] -workingDir [processingDir] -overwrite Y |
The following will not show a password prompt for the CSS/PostgreSQL operator user passwords during the process:
SET SOURCEPASSWORD=[TYPE_PASSWORD OF SOURCE CSS DB] SET TARGETPASSWORD=[TYPE_PASSWORD OF TARGET CSS DB] CombinedTransfer.bat -mngt_list "[management_schema_name/s]" -logpath [loglocation] -sourcehost [hostname] -sourceport [port_number] -sourcedatabase [database_name] -sourceusername [user_name] -targethost [hostname] -targetport [port_number] -targetdatabase [database_name] -targetusername [user_name] -workingDir [processingDir] -overwrite Y -promptpassword N |
Error Code 296 | Provided localhost for SOURCEHOST. Ensure you use a host name or IP address. |
---|---|
Error Code 297 | Provided localhost for TARGETHOST. Ensure you use a host name or IP address. |
Error Code 298 | Source and Target host/port are same. |
Error Code 299 | PSQL Version of Source Server is greater than your Target Server. You cannot use this batch script to move from schemas from, for example, PostgreSQL 10 to CSS3 (PostgreSQL 9.6). |
Error Code 300 | SOURCEPASSWORD not provided. |
Error Code 301 | TARGETPASSWORD not provided |
Error Code 302 | Source DB Connection failed / Authentication failed. |
Error Code 303 | Target DB Connection failed / Authentication failed. |
Error Code 304 | Provided management schema(s) name not found in Source DB. |
Error Code 305 | No application has been found in this combined installation. Your chosen combined installation of schemas (Analysis, Dashboard, Management) must contain at least ONE application. |
Error Code 306 | Backup process failed. |
Error Code 307 | Restore process failed. |
Error Code 308 | Updating table cms_inf_store_css in Target DB failed. |
Error Code 309 | Connection Profile creation failed. |
Error Code 310 | Dropping combined installation from Source DB failed. |
This method functions for installations of CAST Storage Service on Windows and PostgreSQL on Linux but can only be run from Windows. The process involves dumping the required schemas to file and then restoring the dumps on the new host. The CAST Storage Services/PostgreSQL do not need to be installed on the same host, and both can be remote to the machine on which you are running the CAST Storage Service backup/restore tools.
Required | Description |
---|---|
Ensure that no CAST AIP applications are using the source and target CAST Storage Service/PostgreSQL instances. | |
Ensure that you are using the backup and restore tools provided with CAST AIP ≥ 8.3.x. |
Please refer to the documentation in Maintenance activities for CAST Storage Service and PostgreSQL for more information:
When you have completed the upgrade, you will need to complete the following actions: Update all CAST Management Studio connection profiles to allow connection to the same schemas on the new host Open the following file with a text editor:
Modify in the relevant <connectionprofiles.ConnectionProfilePostgres> tag, the following attributes:
When the changes have been made, save the file.
Update connection profiles for CAST Server Manager, CAST Enlighten and CAST Report Center CAST Server Manager, CAST Enlighten and CAST Report Center use a legacy type of connection profile that is difficult to edit manually. The simplest method therefore is to run each exe and either:
Update cms_inf_store_css table in _MNGT schema If the source and target servers are located on the SAME host, run the following script to perform the required update, where <prefix> is the schema prefix for the schemas that you have moved to the target server and where <TargetServer> is the host name of the target server. This will change the port number from 2282 to 5432 and ensure that the display name for the CAST Storage Service/PostgreSQL in the CAST Management Studio Services view is correct:
If the source and target servers are located on DIFFERENT hosts, run the following query instead, where <prefix> is the schema prefix for the schemas that you have moved to the target server and where <TargetServer> is the host name of the target server. This will update the port number, host name and ensure that the display name for the CAST Storage Service/PostgreSQL in the CAST Management Studio Services view is correct:
|
Note that CSS Upgrade Wizard is deprecated starting CAST AIP 8.3.25. Please use an alternative method. |
This method functions for installations of CSS on Windows and PostgreSQL on Linux but can only be run from Windows. The upgrade process uses the CSS Upgrade Wizard, provided as part of the CAST AIP ≥ 8.3.x, and involves a fully automated process of dumping the required schemas to file and then restoring the dumps on the new host. The CAST Storage Services/PostgreSQL do not need to be installed on the same host, and both can be remote to the machine on which you are running the CSS Upgrade Wizard.
Required | Description |
---|---|
Ensure that no CAST AIP applications are using the source and target CAST Storage Service/PostgreSQL instances. | |
Ensure that you are using the CSS Upgrade Wizard provided with CAST AIP ≥ 8.3.x. | |
You must not use "localhost" in the Host field in the CAST Upgrade Wizard for the Source and Target Servers even if the servers are both located on the current machine. The value entered in the Host field in the CAST Upgrade Wizard must match the value defined for the Host field in the Management Service editor in the CAST Management Studio: If you have used "localhost" in the CAST Management Studio to define a connection to the Management Service, you MUST update this to use either the server's netbios name or its IP address before running the CSS Upgrade Wizard. |
Launch the CSS Upgrade Wizard from the Windows Start menu as follows:
When the CSS Upgrade Wizard is launched an initial Welcome page will be displayed. Click Next to continue. The Source Server page will then be displayed: This page enables you to fill in the connection information for your "source server" - i.e. the machine hosting the CAST Storage Service/PostgreSQL whose schemas will be moved.
Fill in the required fields and then click Next. The Target Server page will then be displayed: This page enables you to fill in the connection information for your "target server" - i.e. the machine hosting the CAST Storage Service/PostgreSQL that will "receive" the schemas from the source CAST Storage Service/PostgreSQL.
Fill in the required fields and then click Next. The Schema Upgrade Selection page will then be displayed. This page will list all the CAST AIP schemas on the Source Server that are eligible for upgrade to the Target Server. Select the schemas that you want to - place a check mark next to each schema as shown below. You can use the Refresh button (lower right corner) to refresh the list of schemas if required. Click Next to continue. This next page requires you to input a temporary "Working Folder". This folder will be used to store the selected schemas in file format during the transfer process - please choose a folder with plenty of free space. The folder must also already exist and must be empty. Click Finish to continue the process. A summary of the upgrade action is the displayed: Check that the summary of the upgrade action is as you require. Click Upgrade to start the process. On completion a message will be displayed showing you where the log of the entire process is stored: Please check the log file to ensure there are no failures reported during upgrade. A final page will be displayed - click Finish to terminate the process. Finally, check that the schemas have been correctly moved to the target server using CAST Server Manager. |
When you have completed the upgrade, you will need to complete the following actions: Update all CAST Management Studio connection profiles to allow connection to the same schemas on the new host Open the following file with a text editor:
Modify in the relevant <connectionprofiles.ConnectionProfilePostgres> tag, the following attributes:
When the changes have been made, save the file.
Update connection profiles for CAST Server Manager, CAST Enlighten and CAST Report Center CAST Server Manager, CAST Enlighten and CAST Report Center use a legacy type of connection profile that is difficult to edit manually. The simplest method therefore is to open each one and either:
Update server display name for CAST Management Studio The following action will ensure that the name displayed for the CAST Storage Service in the CAST Management Studio Services view is updated to the new host name: Run the following query in PGAdmin against the _MNGT table on the target CAST Storage Service/PostgreSQL (i.e. the CAST Storage Service/PostgreSQL to which you have moved the schemas): replacing <server B> with the target CAST Storage Service/PostgreSQL name:
The above query will produce update query scripts for every CAST AIP schema on the target CAST Storage Service/PostgreSQL to update the host names in the cms_inf_store_css table. For example: Copy each update query script you need to run (these should cover all the CAST AIP schemas you have moved to the target CAST Storage Service/PostgreSQL with the CSS Upgrade Wizard) into a new PGAdmin query window, as follows: Run the query. |
This method functions for installations of CSS on Windows and PostgreSQL on Linux, and assumes that the two CAST Storage Services are already installed on the same host. The upgrade process uses the pg_upgrade tool from the new release of the DBMS and will copy the data from the old CAST Storage Service/Postgres instance to the new, leaving the old CAST Storage Service/PostgreSQL instance in full working order.
Required | Description |
---|---|
Ensure the CAST Storage Service/PostgreSQL instances are installed on the same host server - this is highly recommended for performance reasons. | |
The upgrade process will leave the old CAST Storage Service/PostgreSQL instance in place and unchanged, however, CAST does recommend that you backup any CAST AIP schemas you may have on this server using the CAST tools. See Maintenance activities for CAST Storage Service and PostgreSQL. | |
Ensure that no CAST AIP applications are using the CAST Storage Service/PostgreSQL instance. |
|
|
When you have completed the upgrade, you will need to complete the following actions: Update all CAST Management Studio connection profiles to allow connection to the same schemas on CSS3 Open the following file with a text editor:
Modify in the relevant <connectionprofiles.ConnectionProfilePostgres> tag, the following attributes:
When the changes have been made, save the file.
Update connection profiles for CAST Server Manager, CAST Enlighten and CAST Report Center to allow connection to the same schemas on CSS3 CAST Server Manager, CAST Enlighten and CAST Report Center use a legacy type of connection profile that is difficult to edit manually. The simplest method therefore is to run each exe and either:
Update cms_inf_store_css table in _MNGT schema on CSS3 If the CSS2 and CSS3 are located on the SAME host, run the following script to perform the required update, where <prefix> is the schema prefix for the schemas that you have moved to CSS3 and where <CSS3> is the host name of the CSS3 server. This will change the port number from 2280 to 2282 and ensure that the display name for the CAST Storage Service in the CAST Management Studio Services view is correct:
If the CSS2 and CSS3 servers are located on DIFFERENT hosts, run the following query instead, where <prefix> is the schema prefix for the schemas that you have moved to CSS3 and where <CSS3> is the host name of the CSS3 server. This will update the port number, host name and ensure that the display name for the CAST Storage Service in the CAST Management Studio Services view is correct:
|