For dump operations that you execute regularly, we recommend that you write a script that creates and saves the dump object and checks for errors after the execution. Using a script avoids re-creating the dump object manually each time you want to perform the task.
To use a script:
Write a script that creates the dump object, sets its properties, saves the object, and checks for errors.
If you do not set the file_name property to a full path, Content Server assumes the path is relative to the root directory of the server. The filename must be unique within its directory. This means that after a successful load operation that uses the dump file, you must move the dump file to archival storage or destroy it so you can successfully execute the script later.
Use IAPI to execute the script. Use the following command-line syntax:
iapi source_db -Uusername -Ppassword < script_filename
where:
source_db is the name of the repository that you want to dump.
username is the user name of the user who is executing the operation.
password is the user password.
script_filename is the name of the file you created in Step 1.
If the dump was successful, destroy the dump object. If the Save on the dump operation did not return OK, the dump was not successful.
Destruction of the dump object cleans up the repository and removes the dump object records and state information that are no longer needed.