ttBackup
Description
Creates either a full or an incremental backup copy of the database specified by connStr
. You can back up a database either to a set of files or to a stream. You can restore the database at a later time using either the ttRestore
function or the ttRestore
utility.
Also see ttBackup in Oracle TimesTen In-Memory Database Reference.
Required Privilege
ADMIN
Syntax
ttBackup (ttUtilHandle handle, const char* connStr,
ttBackUpType type, ttBooleanType atomic,
const char* backupDir, const char* baseName,
ttUtFileHandle stream)
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Specifies the TimesTen utility library environment handle allocated using |
|
|
This is a null-terminated string specifying a connection string that describes the database to be backed up. |
|
|
Specifies the type of backup to be performed. Valid values are as follows:
|
|
|
Specifies the disposition of an existing backup with the same This parameter has an effect only on full file backups when there is an existing backup with the same The following are valid values:
|
|
|
Specifies the backup directory for file backups. It is ignored for stream backups. Otherwise it must be non-null. For For |
|
|
Specifies the file prefix for the backup files in the backup directory specified by the It is ignored for stream backups. If For |
|
|
For stream backups, this parameter specifies the stream to which the backup is to be written. On Linux or UNIX, it is an integer file descriptor that can be written to by using On Windows, it is a handle that can be written to using This parameter is ignored for file backups. The application can pass |
Example
This example backs up the database for the payroll
DSN into C:\backup
.
ttUtilHandle utilHandle; int rc; rc = ttBackup (utilHandle, "DSN=payroll", TT_BACKUP_FILE_FULL, TT_TRUE, "c:\\backup", NULL, TTUTIL_INVALID_FILE_HANDLE);
Upon successful backup, all files are created in the C:\backup
directory.
Note
Each database supports only eight incremental-enabled backups.