Restoring to the point of failure on an Oracle or Postgres database requires the following information:
A database backup for the files that were lost. This backup can be either an online table space backup as described in the previous section or an offline database backup.
For an Oracle database, a set of archived redo logs for the period of time following the backup. In case of an online backup you also need the redo logs created during the time of backup.
For an Oracle database, the database looks for archived redo logs in the location specified by the LOG_ARCHIVE_DEST parameter of the initdb-name.ora file. Alternatively, you can specify a location for the archived redo logs manually by using the from clause in the alter database recover... statement.
Run the command:
/opt/terraspring/sbin/restoredb restored file name
The parameter restored file name refers to the backup file created during backup of the database.
Run the configure.sh script and provide the required parameters when prompted.
/opt/terraspring/gwdb/bin/configure.sh
For a Postgres database:
DB_TYPE Postgres (case-sensitive) DB Admin User: postgres DB Admin Password: postgres DB User: tcc DB Password: tcc DB HOst Name: localhost DB Instance Name: tsprdb DB Instance Listening Port: 5432 DB Backup Directory: backup direcotry name DB Backup Filename: backup file name |
For an Oracle database:
DB_TYPE Postgres (case-sensitive) DB Admin User: system DB Admin Password: manages DB User: tcc DB Password: tcc DB HOst Name: localhost DB Instance Name: tsprdb DB Instance Listening Port: 1521 DB Backup Directory: backup direcotry name DB Backup Filename: backup file name |
To create the database type:
/opt/terraspring/gwdb/bin/createDB.sh -y
To restore the database type:
/opt/terraspring/gwdb/bin/restoreDB