Generating data backup and restore scripts (Windows)
Procedure
backupScriptGen.xml
script
located in the <INSTALL_DIR>\bin
directory using
the following command: sci_ant.cmd
-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.
export,
import, or sqlplus
utilities. You can modify and use the
following scripts: backup_config_oracle.cmd
- generatesbackup_<tabletype>_<dbtype>.cmd
, a backup script for the given table type and database vendor.restore_config_oracle.cmd
- generatesrestore_<tabletype>_<dbtype>.cmd
, a restore script for the given table type and database vendor.delete_configuration_oracle.sql
- generatesdelete_<tabletype>_<dbtype>.sql
, a SQL script to delete all data of a given table type, used as part of a restore script.