Generating data backup and restore scripts (UNIX or Linux)
Procedure
./sci_ant.sh -f backupScriptGen.xml -DdbType=<database_type>
This script generates sample backup and restore scripts in the <INSTALL_DIR>/bin/sample directory.
You can rename and customize the scripts to suit your business needs. For example, you can modify the script to add your custom configuration tables and modify the path where the data files are stored. These scripts depend on utilities provided by the database vendors.
The backupScriptGen.xml script accepts the following arguments:
| Argument | Purpose | Accepted Values |
|---|---|---|
| -Dos= | Determines what kind of script is generated. If "windows" is selected, a .cmd file is created. If "linux" or "unix" is selected, a .sh file is created. If "all" is selected, both .cmd and .sh files are created. |
|
| -DdbType= | Determines for which databases the scripts will be generated. |
|
| -DtableType= | Determines which entities to generate scripts for. Valid values are any TableType attribute defined for an entity. |
Note: The value ALL is
supported only for single-schema mode.
|
Results
Running the backupScriptGen.xml script creates both backup and restore scripts for the selected operating systems and databases.
- backup_config_oracle.sh - generates backup_<tabletype>_<dbtype>.sh, a backup script for the given table type and database vendor.
- restore_config_oracle.sh - generates restore_<tabletype>_<dbtype>.sh, a restore script for the given table type and database vendor.
- delete_configuration_oracle.sql - generates delete_<tabletype>_<dbtype>.sql, a SQL script to delete all data of a given table type, used as part of a restore script.