Incremental Backup

The Incremental Backup feature uses the following structures defined in mco.h:

 
    typedef struct mco_backup_info_t 
    {
        uint4 magic; 
        uint4 protocol_version; 
        uint4 type; 
        uint4 flags; 
        uint4 backup_no; 
        uint8 timestamp; 
        uint8 size; 
        uint8 offset; 
        uint4 crc; 
        mco_trans_counter_t trans_no; 
        uint4 mem_page_size; 
        uint4 disk_page_size; 
        mco_counter_t n_pages_total; 
        char db_name[MCO_MAX_BACKUP_DBNAME_SIZE];
        char label[MCO_MAX_BACKUP_LABEL_SIZE]; 
     
    } mco_backup_info_t;
     
    typedef struct tag_mco_async_backup_progress_info_ 
    {
        mco_backup_progress_info_t core_info; 
        char const *               file_name; 
        char const *               last_label; 
        mco_backup_type            type; 
        int                        compression_level; 
        MCO_RET                    last_error_code; 
        char const *               last_error_msg; 
     
    } mco_async_backup_progress_info_t;
     

Definitions

magic A "magic" number to identify the backup record header
protocol_version The backup protocol identification
type

The type of the backup record: one of the following:

   
  typedef enum {
    MCO_BACKUP_TYPE_AUTO,
    MCO_BACKUP_TYPE_SNAPSHOT,
    MCO_BACKUP_TYPE_INCREMENTAL
  } mco_backup_type;
   
flags

The backup flags: a combination of the following:

   
  typedef enum {
    MCO_BACKUP_FLAG_COMPRESSED = 1,
    MCO_BACKUP_FLAG_ENCRYPTED  = 2
  } mco_backup_flags;
   
backup_no A sequential number
timestamp The backup timestamp
size The size of the backup segment including the header (mco_backup_info_t)
offset The offset in the file
crc The backup record checksum
trans_no The last transaction number
mem_page_size The size of the memory page for the database
disk_page_size The size of the persistent storage page for the database
n_pages_total The total number of memory pages
db_name The name of the database
label The backup record label
Asynchronous backup progress
core_info The core backup info structure
file_name The name and location of the backup file
last_label The latest backup record label
type The type of the backup set by mco_async_backup_start()
compression_level The backup compression level set by mco_async_backup_start()
last_error_code The latest error code of the async backup processing
last_error_msg The latest error message from the async backup processing