mco_backup_incremental_processing_get

Retrieve the current status of incremental backup processing for a database.

For an overview see page Incremental Online Backup in C

Prototype

    MCO_RET mco_backup_incremental_processing_get(
        /*IN*/  mco_db_h connection,
        /*OUT*/ mco_bool *enabled
    );

Arguments

connection
Valid database connection handle.
enabled
Pointer to a variable that will receive the incremental backup status:
  • MCO_YES — incremental backup processing is enabled,
  • MCO_NO — incremental backup processing is disabled.

Description

This function checks whether incremental backup processing is currently enabled for the specified database.

Incremental backup must be explicitly enabled at database creation time by setting the MCO_DB_INCREMENTAL_BACKUP_ENABLED flag in the database mode mask. This function returns the runtime status of that configuration.

Note that even if incremental backup is enabled, timestamping (required for tracking page modifications) may be activated only after the first snapshot backup is created.

See Incremental Backup and Restore for more details.

Return Codes

MCO_S_OK
Successfully retrieved the incremental backup status.
MCO_E_ILLEGAL_PARAM
Invalid argument (e.g., NULL connection or enabled pointer).
MCO_E_BACKUP_INVALID_PARAM
Incremental backup support is not enabled in the database configuration (MCO_DB_INCREMENTAL_BACKUP_ENABLED flag was not set at database creation).

Example

    {
        mco_db_h con;
        mco_bool enabled;
        MCO_RET rc;

        rc = mco_db_connect("mydb", &con);
        if (rc != MCO_S_OK) {
            /* handle connection error */
        }
        /* ... */
        rc = mco_backup_incremental_processing_get(con, &enabled);
        if (rc == MCO_S_OK) {
            if (enabled == MCO_YES) {
                printf("Incremental backup is enabled\n");
            } else {
                printf("Incremental backup is disabled\n");
            }
        }
    }

Files

Header file:
mco.h
Source file:
mcoabst.c
Library:
libmcolib.a