Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » Database Tools Interface » DBTools structures

DBTools structures Next Page

a_backup_db structure


Holds the information needed to perform backup tasks using the DBTools library.

Syntax
typedef struct a_backup_db {
    unsigned short      version;
    const char *        output_dir;
    const char *        connectparms;
    const char *        _unused0;
    MSG_CALLBACK        confirmrtn;
    MSG_CALLBACK        errorrtn;
    MSG_CALLBACK        msgrtn;
    MSG_CALLBACK        statusrtn;
    a_bit_field         backup_database : 1;
    a_bit_field         backup_logfile  : 1;
    a_bit_field         _unused1        : 1;
    a_bit_field         no_confirm      : 1;
    a_bit_field         quiet           : 1;
    a_bit_field         rename_log      : 1;
    a_bit_field         truncate_log    : 1;
    a_bit_field         rename_local_log: 1;
    const char *        hotlog_filename;
    char                backup_interrupted;
    a_bit_field         server_backup   : 1;
    a_chkpt_log_type    chkpt_log_type;
    a_sql_uint32        page_blocksize;
} a_backup_db;
Members
Member Description
Version DBTools version number.
output_dir

Path to the output directory. For example:

"c:\backup"
connectparms

Parameters needed to connect to the database. They take the form of connection strings, such as the following:

"UID=DBA;PWD=sql;DBF=samples-dir\demo.db"

The database server would be started by the connection string START parameter. For example:

"START=d:\sqlany10\win32\dbeng10.exe"

A full example connection string including the START parameter:

"UID=DBA;PWD=sql;DBF=samples-dir\demo.db;START=d:\sqlany10\win32\dbeng10.exe"

For a list of connection parameters, see Connection parameters.

confirmrtn Callback routine for confirming an action.
errorrtn Callback routine for handling an error message.
msgrtn Callback routine for handling an information message.
statusrtn Callback routine for handling a status message.
backup_database Back up the database file (1) or not (0).
backup_logfile Back up the transaction log file (1) or not (0).
_unused1 (unused)
no_confirm Operate with (0) or without (1) confirmation.
quiet Operate without printing messages (1), or print messages (0).
rename_log Rename the transaction log.
truncate_log Delete the transaction log.
rename_local_log Rename the local backup of the transaction log.
hotlog_filename File name for the live backup file.
backup_interrupted Indicates that the operation was interrupted.
server_backup When set to 1, indicates backup on server using BACKUP DATABASE. Equivalent to dbbackup -s option.
chkpt_log_type Control copying of checkpoint log. Must be one of BACKUP_CHKPT_LOG_COPY, BACKUP_CHKPT_LOG_NOCOPY, BACKUP_CHKPT_LOG_RECOVER,BACKUP_CHKPT_LOG_AUTO, or BACKUP_CHKPT_LOG_DEFAULT.
page_blocksize Number of pages in data blocks. Equivalent to dbbackup -b option. If set to 0, then the default is 128.
See also