Redirect | ||||
---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
|
...
Info |
---|
Summary: This section is designed to group together all miscellaneous backup, optimization and maintenance documentation related to the CAST Storage Service/PostgreSQL. All the tools listed in this page can be found in the CSSAdmin folder at the root of your CAST AIP installation. |
Backing up a CAST AIP schema
Info |
---|
|
...
Code Block | ||
---|---|---|
| ||
CSSBackup.exe -schema <schema_name> -password <Operator_password> -file <path_and_name_of_backup_file.cssdmp> -log <path_and_name_of_log_file.log> |
Required parameters
-schema | Name of CAST schema to backup. | |||||
-password | CAST Storage Service/PostgreSQL instance "operator" password. | |||||
-file | Path and name of backup dump file, using the .cssdmp extension. Backup will fail if this file already exists. | |||||
-log | Path and name of output log file - does not need to exist already (logging functions in append mode). The resulting file is text based. Note that you can increase logging verbosity by using the parameter set CASTLOGMODE=DEBUG at the start of your command line, e.g.:
|
Additional optional parameters
-host | Name/IP address of machine hosting the CAST Storage Service/PostgreSQL instance (default: localhost). Only required if the CAST Storage Service/PostgreSQL instance is on a remote machine. | |||||||
-port | CAST Storage Service/PostgreSQL instance port (default: 2280 - CSS2):
| |||||||
-username | CAST Storage Service/PostgreSQL instance username (default: Operator). | |||||||
-database | Not used (default: postgres). | |||||||
-exedir | Used when you want to run CSSBackup.exe from outside the AIP Core installation folder: allows you to specify the path to the AIP Core installation folder | |||||||
-compress | (boolean: Y or N) Determines whether the resulting backup dump file is compressed or not (default: Y). Setting -compress N is not recommended as the resulting file will be significantly bigger. | |||||||
-psqlexedir | (Valid in CAST AIP ≥ 8.3.10): Allows the definition of an alternative location (for example, outside the AIP COre installation folder) for the PostgreSQL binaries used for this tool:
For example - this path must not end with a back slash ( \ ):
| |||||||
-h | Displays a list of available commands. |
Result
The result of a successful backup process is the creation of the .cssdmp file specified in the parameter -file. This file can then be used in the restore process (see below).
Supported data types
Ordinarily, the CSSBackup tool will backup a standard CAST AIP schema and all its data. However, if you have customized the schema (by adding new tables or adding new columns to existing tables), you may find that the customizations are not included in the backup result. This can occur when your customizations use data types that are not supported by the CSSBackup process. CAST supports only the following datatypes:
...
If an unsupported data type is encountered during the backup process, the table containing the unsupported data type will be excluded from the backup. A list of excluded tables is displayed in the log file, which you should check on completion of the backup process.
Backing up all CAST AIP schemas in one go
Info |
---|
|
...
Code Block | ||
---|---|---|
| ||
CSSBackupAll.exe -password <Operator_password> -dumpdir <path_to_the_dump_folder> -log <path_and_name_of_log_file.log> |
Required parameters
-password | CAST Storage Service/PostgreSQL instance "operator" password. | |||||
-dumpdir | Path to the folder that will store the result of the backup action. This folder must already exist. | |||||
-log | Path and name of output log file - does not need to exist already (logging functions in append mode). The resulting file is text based. Note that you can increase logging verbosity by using the parameter set CASTLOGMODE=DEBUG at the start of your command line, e.g.:
|
Additional optional parameters
-host | Name/IP address of machine hosting the CAST Storage Service/PostgreSQL instance (default: localhost). Only required if the CAST Storage Service/PostgreSQL instance is on a remote machine. | |||||||
-port | CAST Storage Service/PostgreSQL instance port (default: 2280 - CSS2):
| |||||||
-username | CAST Storage Service/PostgreSQL instance username (default: Operator). | |||||||
-database | Not used (default: postgres). | |||||||
-exedir | Used when you want to run CSSBackupAll.exe from outside the AIP Core installation folder: allows you to specify the path to the AIP Core installation folder | |||||||
-compress | (boolean: Y or N) Determines whether the resulting backup dump files are compressed or not (default: Y). Setting -compress N is not recommended as the resulting file will be significantly bigger. | |||||||
-psqlexedir | (Valid in CAST AIP ≥ 8.3.10): Allows the definition of an alternative location (for example, outside the AIP Core installation folder) for the PostgreSQL binaries used for this tool:
For example - this path must not end with a back slash ( \ ):
| |||||||
-h | Displays a list of available commands. |
Result
The result of a successful backup process is the creation of the multiple .backup files in the folder specified in the -dumpdir parameter. The contents of this folder can then be used in the "restore all" process (see below).
Restoring a backed up CAST AIP schema
Info |
---|
The CSSRestore release number (i.e. the AIP Core release) must be the same or higher than the CSSBackup release (i.e. the AIP Core release) used to backup the schemas. |
...
Code Block | ||
---|---|---|
| ||
CSSRestore.exe -schema <schema_name> -password <Operator_password> -file <path_and_name_of_backup_file.cssdmp> -log <path_and_name_of_log_file.log> |
Required parameters
-schema | Name of CAST AIP schema to restore. The schema is created if it does not already exist. If the schema exists already, the restore will fail. | |||||
-password | CAST Storage Service/PostgreSQL instance "operator" password. | |||||
-file | Path and name of backup dump file, using the .cssdmp extension. | |||||
-log | Path and name of output log file - does not need to exist already (logging functions in append mode). The resulting file is text based. Note that you can increase logging verbosity by using the parameter set CASTLOGMODE=DEBUG at the start of your command line, e.g.:
|
Additional optional parameters
-host | Name/IP address of machine hosting the CAST Storage Service/PostgreSQL instance (default: localhost). Only required if the CAST Storage Service/PostgreSQL instance is on a remote machine. | |||||||
-port | CAST Storage Service/PostgreSQL instance port (default: 2280 - CSS2):
| |||||||
-username | CAST Storage Service/PostgreSQL instance username (default: Operator). | |||||||
-database | Not used (default: postgres). | |||||||
-exedir | Used when you want to run CSSRestore.exe from outside the AIP Core installation folder: allows you to specify the path to the AIP Core installation folder | |||||||
-psqlexedir | (Valid in CAST AIP ≥ 8.3.10): Allows the definition of an alternative location (for example, outside the AIP Core installation folder) for the PostgreSQL binaries used for this tool:
For example - this path must not end with a back slash ( \ ):
| |||||||
-h | Displays a list of available commands. |
Result
The result of a successful restore process is a fully functioning CAST AIP schema that can be used immediately.
Note |
---|
It is often useful to optimize the CAST AIP schema you've just restored. See Optimizing CAST schemas. |
Restoring all backed up CAST AIP schemas in one go
Info |
---|
The CSSRestoreAll release (i.e. the AIP Core release) must be the same or higher than the CSSBackupAll release (i.e. the AIP Core release) used to backup the schemas. |
...
Code Block | ||
---|---|---|
| ||
CSSRestoreAll.exe -password <Operator_password> -dumpdir <path_to_the_dump_folder> -log <path_and_name_of_log_file.log> |
Required parameters
-password | CAST Storage Service/PostgreSQL instance "operator" password. | |||||
-dumpdir | Path to the folder containing the result of the "backup all" action. | |||||
-log | Path and name of output log file - does not need to exist already (logging functions in append mode). The resulting file is text based. Note that you can increase logging verbosity by using the parameter set CASTLOGMODE=DEBUG at the start of your command line, e.g.:
|
Additional optional parameters
-host | Name/IP address of machine hosting the CAST Storage Service/PostgreSQL instance (default: localhost). Only required if the CAST Storage Service/PostgreSQL instance is on a remote machine. | |||||||
-port | CAST Storage Service/PostgreSQL instance port (default: 2280 - CSS2):
| |||||||
-username | CAST Storage Service/PostgreSQL instance username (default: Operator). | |||||||
-database | Not used (default: postgres). | |||||||
-exedir | Used when you want to run CSSRestoreAll.exe from outside the AIP Core installation folder: allows you to specify the path to the AIP Core installation folder | |||||||
-psqlexedir | (Valid in CAST AIP ≥ 8.3.10): Allows the definition of an alternative location (for example, outside the AIP Core installation folder) for the PostgreSQL binaries used for this tool:
For example - this path must not end with a back slash ( \ ):
| |||||||
-h | Displays a list of available commands. |
Result
The result of a successful "restore all" process is fully functioning CAST AIP schemas that can be used immediately.
Note |
---|
|
Resetting Operator and Guest passwords
Note |
---|
Note that this section of documentation is only applicable to CAST AIP ≤ 8.3.11. In CAST AIP ≥ 8.3.12, resetting passwords for CAST Storage Service/PostgreSQL instance users is no longer possible. |
...
If this is the case, the Operator and Guest passwords must be reset to their defaults (CastAIP and WelcomeToAIP respectively) using a specific tool (CSSPasswordReset.exe). To prevent unauthorised password resetting, CAST has implemented a system whereby a special "unlock code" will be provided by CAST Support BEFORE the passwords can be reset - this unlock code is generated using the two pieces of information returned by CSSPasswordReset.exe (namely the CAST license key and a random "Personal Unblocking Key" (PUK)). Once the unlock code is provided by CAST Support, the CAST tool (CSSPasswordReset.exe) can be run again to reset the passwords.
Step 1: retrieve license key and PUK
To retrieve the license key and PUK from your CAST Storage Service/PostgreSQL instance, locate the file CSSResetPassword.exe. CAST recommends running the process from a batch file (make sure that all commands are placed on one single line and remember to surround any paths (i.e. to the .exe) with quote marks if the path contains spaces). A typical command line to retrieve the license key and PUK would be as follows:
Code Block | ||
---|---|---|
| ||
CSSResetPassword.exe -host <CAST_Storage_Service/PostgreSQL instance_host_machine> |
Result
When the CSSResetPassword.exe tool is run successfully, it will return the current CAST AIP licence key and the PUK. You should then transfer these two pieces of information to CAST Support, who will then generate an unlock code that you can use in Step 2 below.
Step 2: use the unlock code generated by CAST Support
To use the unlock code generated by CAST Support, locate the file CSSResetPassword.exe. CAST recommends running the process from a batch file (make sure that all commands are placed on one single line and remember to surround any paths (i.e. to the .exe) with quote marks if the path contains spaces). A typical command line to use the unlock code would be as follows:
Code Block | ||
---|---|---|
| ||
CSSResetPassword.exe -host <CAST_Storage_Service/PostgreSQL instance_host_machine> -unlockcode <Unlock_code> |
Result
When the CSSResetPassword.exe tool is run successfully with the unlock code, the Operator and Guest passwords will be reset to their defaults (CastAIP and WelcomeAIP respectively).
Parameters
To use the CSSResetPassword.exe tool, use the following parameters:
Required parameters
-host | Name/IP address of machine hosting the CAST Storage Service/PostgreSQL instance. |
Optional parameters
-port | CAST Storage Service/PostgreSQL instance port. Only required if you have modified the port number during the installation process. |
-unlockcode | CAST Unlock Code generated by CAST Support. |
-h | Displays a list of available commands. |
Managing user-defined parameters in the CAST Storage Service
Note |
---|
Note that this section of documentation is only applicable to CAST Storage Service 2. |
...
- inject the modified parameters into the existing CAST Storage Service
- inject modified parameters from an old CAST Storage Service into a newly installed CAST Storage Service
Storage of user-defined parameters and update tool
CSS.config
Any user-defined parameters for the CAST Storage Service are stored in an XML file called CSS.config. This file is stored at the root of your CAST Storage Service installation location. Typically its format is as follows:
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="ISO-8859-1"?> <CastStorageSettings> <WindowsService name="CastStorageService3" /> <DbData path="C:\Program Files\CAST\CASTStorageService3\db_data" /> <Parameters> <Parameter name="TcpPort" value="2282" /> </Parameters> </CastStorageSettings> |
CSSConfig.exe
The CAST Storage Service update tool is called CSSConfig.exe and is located in the <CAST_storage_service_install_location>\bin folder.
Modifying user-defined parameters
If you need to modify any of the user-defined parameters during the lifetime of the CAST Storage Service:
...
Info |
---|
Remember that if you changed the port number, you may need to update your connection profiles in the CAST applications. |
Retaining user-defined parameters
If you have already made some modifications to the user-defined parameters but now need to to re-install the CAST Storage Service, you can retain your user-defined parameters as follows:
- Make sure you backup your existing CAST schemas - see above.
- Make a backup of the CSS.config file and move the copy to a different location on disk
- Uninstall the existing CAST Storage Service using the built-in Windows uninstaller
- Re-install the CAST Storage Service using the CAST setup
- Follow the above instructions (from point 2 onwards) to inject your existing user-defined parameters into the new CAST Storage Service
Optimizing CAST AIP schemas - CSSOptimize
Over time and through continued use, the efficiency of your Application's CAST AIP schemas may well start to degrade ("gaps" in table data, inefficient indexes etc.) - this degradation can significantly impact the performance of CAST AIP, with the most visible impact seen in the performance of the CAST Dashboards. To counter this, CAST provides a tool (known as CssOptimize) that can be run to optimize the schemas stored in your CAST Storage Service/PostgreSQL instance - i.e. to clean up defects that have appeared over time.
...
Code Block | ||
---|---|---|
| ||
CSSOptimize.exe -schema <schema_to_optimize> -password <Operator_password> -log <path_to_log_file> |
Required parameters
-schema | Name of CAST AIP schema to optimize (not case sensitive). |
-password | CAST Storage Service/PostgreSQL instance username password. |
-log | Path and name of output log file - does not need to exist already (logging functions in append mode). The resulting file is text based. |
Additional optional parameters
-host | Name/IP address of machine hosting the CAST Storage Service/PostgreSQL instance. (default: localhost). | ||
-port | CAST Storage Service/PostgreSQL instance port (default: 2280 - CSS2):
| ||
-database | Not used (default: postgres). | ||
-username | Name of the CAST Storage Service/PostgreSQL instance user - for example, operator, or a custom user. (default: operator).
| ||
-user | CAST Storage Service/PostgreSQL instance username (default: Operator).
| ||
-operation | Choose the PostgreSQL operation to perform:
| ||
-h | Displays a list of available commands. |
Examples
Minimum required parameters using default Operator user and default port to perform -operation analyze on CSS2:
...
Code Block | ||
---|---|---|
| ||
CSSOptimize.exe -schema LOCAL -port 2282 -username my_custom_user -password my_custom_password -operation vacuum_analyze -log log.txt |
Anchor | ||||
---|---|---|---|---|
|
See CAST Storage Service - Moving existing schemas to new hosts.