qdb_backup()

Start a database backup

Synopsis:

#include <qdb/qdb.h>

int qdb_backup( qdb_hdt_t *db,
                int scope );

Arguments:

db
A pointer to the database handle.
scope
The scope of the backup. Possible values are:
QDB_ATTACH_DEFAULT
Act on attached databases as specified in the configuration object, honoring the value of the VacuumAttached, BackupAttached, and SizeAttached parameters. This gives backward-compatible behavior.
QDB_ATTACH_ALWAYS
Always act on any attached databases, regardless of configuration object settings.
QDB_ATTACH_NEVER
Act only on the connected database itself, never on any attached databases.

Library:

qdb

Description:

This function performs a backup on the connected database db and optionally any attached databases, depending on the scope argument. Backups are controlled in the configuration object, with the BackupDir and Compression options. For more information about these options, see the Database configuration objects section.

A client can cancel a backup operation by calling qdb_bkcancel(). If a backup is canceled (either by a client or through the QDB resource manager interface), the call to qdb_backup() fails and returns -1, with errno set to EINTR.

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes