mco_backup_incremental_processing_set

Enable or disable incremental backup processing for a database.

For an overview see page Incremental Online Backup in C

Prototype

    MCO_RET mco_backup_incremental_processing_set(
        /*IN*/ mco_db_h connection,
        /*IN*/ mco_bool enable
    );

Arguments

connection
Valid database connection handle.
enable
Flag to control incremental backup processing:
  • MCO_YES — enable incremental backup processing,
  • MCO_NO — disable incremental backup processing.

Description

This function enables or disables incremental backup processing for the specified database.

When disabling incremental backup (enable = MCO_NO), the function clears the following internal flags:

This means that after disabling, the next backup operation will be forced to create a full snapshot.

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 only controls the runtime state of that feature.

See Incremental Backup and Restore for more details.

Return Codes

MCO_S_OK
Incremental backup processing state successfully updated.
MCO_E_ILLEGAL_PARAM
Invalid database connection handle.
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_RET rc;

        rc = mco_db_connect("mydb", &con);
        if (rc != MCO_S_OK) {
            /* handle connection error */
        }
        /* ... */
        /* Disable incremental backup processing */
        rc = mco_backup_incremental_processing_set(con, MCO_NO);
        if (rc == MCO_S_OK) {
            printf("Incremental backup disabled\n");
            /* Next backup will be forced to create a full snapshot */
        }
    }

Files

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