The Java Embedded Database Class BackupInfo

BackupInfo defines the eXtremeDBIncremental Backup settings.

For an overview see page Java Database Class

Class Definition

    public static class BackupInfo
    {
        public int        protocolVersion;
        public BackupType type;
        public int        flags;
        public int        backupNo;
        public long       timestamp;
        public long       size;
        public long       offset;
        public int        crc;
        public long       transNo;
        public int        memPageSize;
        public int        diskPageSize;
        public long       nPagesTotal;
        public String     dbName;
        public String     label;

        public BackupInfo(int protocolVersion, BackupType type, int flags,
                    int backupNo, long timestamp, long size, long offset,
                    int crc, long transNo, int memPageSize, int diskPageSize,
                    long nPagesTotal, String dbName, String label)
        {
            this.protocolVersion     = protocolVersion;
            this.type                = type;
            this.flags               = flags;
            this.backupNo            = backupNo;
            this.timestamp           = timestamp;
            this.size                = size;
            this.offset              = offset;
            this.crc                 = crc;
            this.transNo             = transNo;
            this.memPageSize         = memPageSize;
            this.diskPageSize        = diskPageSize;
            this.nPagesTotal         = nPagesTotal;
            this.dbName              = dbName;
            this.label               = label;
        }
    };

Definitions:

protocolVersion
type

The type of backup record; one of the following:

    public enum BackupType {
      Auto, Snapshot, Incremental
    };

where type has the following effect:

  • Auto — Selects a snapshot or incremental record automatically depending on the content of the backup file. If there is no snapshot in the file yet, the backup process will create one; otherwise, a partial backup record is created.
  • Snapshot — Creates an image of the entire database; must be done at least once.
  • Incremental — Creates a partial image of the database containing only differences in the database content between two consecutive backup records.
flags

The backup flags; a combination of the following:

    public static final int BACKUP_FLAG_COMPRESSED = 1;
    public static final int BACKUP_FLAG_ENCRYPTED  = 2;

where the flags have the following effect:

  • BACKUP_FLAG_COMPRESSED — Applies compression to all backup records.
  • BACKUP_FLAG_ENCRYPTED — Encrypts all backup records.
backupNo
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
transNo
The last transaction number
memPageSize
The size of the memory page for the database
diskPageSize
The size of the persistent storage page for the database
nPagesTotal
The total number of memory pages
dbName
The name of the database
label
The backup record label