ttRestore
ttBackup
utility. If the database exists, ttRestore
does not
overwrite it.The attributes in the ttRestore
connection string can contain any
of the first connection or general connection attributes. It can also include the data store
attribute LogDir. All other data store attributes are copied from the backup files. The LogDir
attribute enables the restored database to be relocated.
The ttRestore
action is somewhat more powerful than a first connect, as it can move the database. It is somewhat less powerful than creating a new database, as it cannot override the data store attributes, except for the LogDir
attribute.
For an overview of the TimesTen backup and restore facility, see Back Up, Restore, and Migrate Data in TimesTen Classic in the Oracle TimesTen In-Memory Database Installation, Migration, and Upgrade Guide.
Required Privilege
This utility requires the instance administrator privilege.
Usage in TimesTen Scaleout and TimesTen Classic
This utility is supported in TimesTen Classic but not supported in TimesTen Scaleout.
Syntax
ttRestore {-h | -help | -?} ttRestore {-V | -version} ttRestore [-fname filePrefix] [-noconn] -dir directory [-open | -close] {DSN | -connStr connection_string} ttRestore -i [-noconn] [-open | -close] {DSN | -connStr connection_String}
Options
ttRestore
has the options:
Option | Description |
---|---|
|
An ODBC connection string that specifies a database location, driver, and optionally other connection attribute settings. |
|
Closes a database to user connections. When a database is closed to user connections, new connection attempts will fail, but existing connections are unaffected. |
|
Specifies an ODBC data source name of the database to be administered. |
|
Specifies the directory where the backup files are stored. |
|
Specifies the file prefix for the backup files in the backup directory. The backup files must have been stored in the backup directory with this prefix. The default value for this parameter is the file name portion of the |
|
Prints a usage message and exits. |
|
Read standard input for the backup data. You cannot use the |
|
To ensure that the restore was successful, |
|
Opens a database to user connections. A database is open to user connections by default upon creation. |
|
Prints the release number of |
Examples
% ttRestore -dir /users/pat/TimesTen/backups -fname FastInsBkup FastIns
To back up a database named origDSN
to the directory /users/rob/tmp
and restore it to database named restoredDSN
, use:
% ttBackup -dir /users/rob/tmp -fname restored origDSN % ttRestore -dir /users/rob/tmp -fname restored restoredDSN
The value of fname
is the name that you want for the prefix portion of the backup file name.
On UNIX and Linux systems, to restore a tape backup to the FastIns
database, use:
% dd bs=64k if=/dev/rmt0 | ttRestore -i FastIns
Notes
The ttBackup
utility and the ttRestore
utility back up and restore databases only when the first two parts of the TimesTen release and the platform are the same. For example, you can back up and restore files between release 21.1.1.1.0 and release 21.1.1.2.0 or 21.1.2.1.0. You cannot back up and restore files between release 11.2.2.8.0 and release 18.1.1.1.0, or between release 21.1.2.1.0 and release 21.2.1.1.0. You can use the ttBulkCp
or ttMigrateCS
(UNIX and Linux systems only) utility to migrate databases across major releases or operating systems.
You can backup databases containing cache groups with the ttBackup
utility. However, when restoring such a backup, special consideration is required as the
restored data within the cache groups may be out of date or out of sync with the data in the
back end Oracle database. See the section on Backing Up and Restoring a TimesTen Classic Database with Cache
Groups in the Oracle TimesTen In-Memory Database Cache
Guide for details.