Concept Overview v2.6

Using incremental backups involves the following sequence of steps:

  1. Configure BART, and enable and initiate archiving of WAL files to the archive_path in the same manner as done for full backups.

    The default archive_path is the BART backup catalog (<backup_path>/<server_name>/archived_wals). Using the <archive_path> parameter in the server section of the BART configuration file, you can specify the location where WAL files will be archived.

    For more information about the archive_path parameter and configuring BART, see the EDB Backup and Recovery Installation and Upgrade Guide available at the EDB website.

  2. Take an initial full backup with the BACKUP subcommand. This full backup establishes the parent of the first incremental backup.

  3. Scan all WAL files produced by database servers on which incremental backups are to be taken. These WAL files are scanned once they have been archived to the archive_path.

    Each scanned WAL file results in a modified block map (MBM) file that records the location of modified blocks obtained from the corresponding WAL file. The BART WAL scanner program bart-scanner performs this process.

  4. Take incremental backups using the BACKUP subcommand with the --parent option to specify the backup identifier or name of a previous, full backup or an incremental backup. Any previous backup may be chosen as the parent as long as all backups belong to the same timeline.

  5. The incremental backup process identifies which WAL files may contain changes from when the parent backup was taken to the starting point of the incremental backup. The corresponding MBM files are used to locate and copy the modified blocks to the incremental backup directory along with other database cluster directories and files. Instead of backing up all, full relation files, only the modified blocks are copied and saved. In addition, the relevant MBM files are condensed into one consolidated block map (CBM) file that is stored with the incremental backup.

    Multiple block copier threads can be used to copy the modified blocks to the incremental backup directory. See the EDB Backup and Recovery Installation and Upgrade Guide available at the EDB website for information about setting the thread_count parameter in the BART configuration file. See Backup for information about using the --thread-count option with the BACKUP subcommand.

  6. Invoke the restore process for an incremental backup using the RESTORE subcommand in the same manner as restoring a full backup. The -i option specifies the backup identifier or name of the incremental backup to restore. The restore process begins by going back through the chain of past, parent incremental backups until the initial full backup starting the chain is identified. This full backup provides the initial set of directories and files to be restored to the location specified with the -p option. Each subsequent incremental backup in the chain is then restored. Restoration of an incremental backup uses its CBM file to restore the modified blocks from the incremental backup.

The following sections provide some additional information on these procedures.