Library Version 18.1.40

DbEnv::get_backup_callbacks()
Prev | Chapter 5. The DbEnv Handle | Next

## DbEnv::get_backup_callbacks()

    #include <db_cxx.h>

    DB_ENV->get_backup_callbacks(
            int (**open_func)(DB_ENV *, const char *dbname,
                              const char *target, void **handle),
            int (**write_func)(DB_ENV *, u_int32_t offset_gbytes,
                               u_int32_t offset_bytes, u_int32_t size,
                               u_int8_t *buf, void *handle),
            int (**close_func)(DB_ENV *, const char *dbname, void *handle));

The `DbEnv::get_backup_callbacks()` method retrieves the three callback functions which can be used by the DbEnv::backup() or DbEnv::dbbackup() methods to override their default behavior. These callbacks are configured using the DbEnv::set_backup_callbacks() method.

The `DbEnv::get_backup_callbacks()` method may be called at any time during the life of the application.

The `DbEnv::get_backup_callbacks()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

#### open_func

The open_func parameter is the function used when a target location is opened during a backup.

#### write_func

The close_func parameter is the function used to write data during a backup.

#### close_func

The close_func parameter is the function used when ending a backup and closing a backup target.

### Class

DbEnv

### See Also

Database Environments and Related Methods, DbEnv::set_backup_callbacks() , DbEnv::backup() , and DbEnv::dbbackup() .

Prev | Up | Next
DbEnv::get_errpfx() | Home | DbEnv::get_backup_config()