LucidDbSysRoot BACKUP DATABASE

From Eigenpedia

Jump to: navigation, search

Contents

Syntax

CALL SYS_ROOT.BACKUP_DATABASE( archive_path, backup_type, compression_mode )

Purpose

Creates a system backup of LucidDB. See LucidDbBackupRestore for an overview of backup and restore in LucidDB. BACKUP_DATABASE_IF_SPACE_AVAILABLE can be used instead to make the operation fail fast if insufficient archive space is available.

Parameters

  • archive_path: [VARCHAR(65535)] the pathname of the directory where the backup files will be written
  • backup_type: [VARCHAR(128)] either 'FULL', 'INCREMENTAL', or 'DIFFERENTIAL'
  • compression_mode: [VARCHAR(128)] either 'COMPRESSED' or 'UNCOMPRESSED'; compression is only supported on Linux

Output

The following files are written to the archive directory:

  • backup.properties - Text file with a description of the backup.
    • the type of backup
    • the compression mode
    • the size of db.dat at the start of the backup
    • the commit sequence number at the start of the backup
    • for incremental backups, the commit sequence number of the previous backup
    • for differential backups, the commit sequence number of the last full backup
  • FarragoCatalogDump - An XMI dump of the system catalogs. If the backup is compressed, FarragoCatalogDump.gz is written instead.
  • FennelDataDump.dat - A copy of the backed up data pages, including any system-level metadata pages. If the backup is compressed, FennelDataDump.dat.gz is written instead.

Examples

The following creates a full, compressed backup in the directory, /home/system/fullArchive

CALL SYS_ROOT.BACKUP_DATABASE('/home/system/fullArchive', 'FULL', 'COMPRESSED');

The contents of the backup.properties file will look like the following. upper.bound.csn is the commit sequence number at the start of the backup.

backup.type=FULL
compression.mode=COMPRESSED
db.dat.size=65601536
lower.bound.csn=-1
upper.bound.csn=385

The following creates a differential, uncompressed backup in the directory, /home/system/diffArchive

CALL SYS_ROOT.BACKUP_DATABASE('/home/system/diffArchive', 'DIFFERENTIAL', 'UNCOMPRESSED');

with the following backup.properties file. Note that lower.bound.csn is set to the upper.bound.csn value of the full archive from above, as that's the last full backup that was taken prior to this backup.

backup.type=DIFFERENTIAL
compression.mode=UNCOMPRESSED
db.dat.size=65601536
lower.bound.csn=385
upper.bound.csn=435

Exceptions

Attempting to use COMPRESSED on Windows will give an error "Unsupported operation: popen".

Personal tools