Enable or disable incremental backup processing for a database.
MCO_RET mco_backup_incremental_processing_set(
/*IN*/ mco_db_h connection,
/*IN*/ mco_bool enable
);
connection
enable
MCO_YES — enable incremental backup processing,MCO_NO — disable incremental backup processing.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:
MCO_BACKUP_SNAPSHOT_DONE— indicating that no valid snapshot exists,MCO_BACKUP_TIMESTAMPING_ENABLED— disabling page modification tracking.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_ENABLEDflag in the database mode mask. This function only controls the runtime state of that feature.See Incremental Backup and Restore for more details.
MCO_S_OK
MCO_E_ILLEGAL_PARAM
MCO_E_BACKUP_INVALID_PARAM
MCO_DB_INCREMENTAL_BACKUP_ENABLED flag was not
set at database creation).
{
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 */
}
}