Internal function. This is a low-level runtime routine used by
mco_backup_create()to perform database backup operations.
MCO_RET mco_backup(
/*IN*/ mco_db_h connection,
/*IN*/ const char *label,
/*IN*/ mco_backup_type backup_type,
/*IN*/ mco_backup_info_proc_t proc_info,
/*IN*/ mco_backup_chunk_proc_t proc_chunk,
/*IN*/ void *proc_arg
);
connection
label
MCO_MAX_BACKUP_LABEL_SIZE).backup_type
MCO_BACKUP_TYPE_SNAPSHOT, MCO_BACKUP_TYPE_INCREMENTAL, or MCO_BACKUP_TYPE_AUTO.proc_info
NULL.proc_chunk
NULL.proc_arg
This internal function implements the core logic for creating snapshot and incremental backups of an eXtremeDB database. It is invoked by the public API function
mco_backup_create()and should not be called directly by applications.The function performs the following steps:
- Validates that incremental backup is enabled in the database configuration,
- Determines the appropriate backup type based on existing backup history,
- Iteratively scans memory and disk pages, collecting modified data since the last mark,
- Invokes
proc_infoto report backup metadata,- Invokes
proc_chunkrepeatedly to deliver data chunks (pages, dictionary, indexes, transaction logs, etc.).Backup progress can be monitored via the database’s backup context structure. The function supports both full (snapshot) and differential (incremental) backup modes.
See Incremental Backup and Restore in C for usage examples.
MCO_S_OK
MCO_E_ILLEGAL_PARAM
NULL connection, missing callbacks).MCO_E_BACKUP_INVALID_PARAM
MCO_DB_INCREMENTAL_BACKUP_ENABLED flag missing).MCO_E_BACKUP_SNAPSHOT_ONLY