BART Management Overview v2.6

After configuring BART, you can begin the backup and recovery management process. The following steps will help you get started:

  1. Run the CHECK-CONFIG subcommand without the -s option. When the CHECK-CONFIG subcommand is used without specifying the -s option, it checks the parameters in the global section of the BART configuration file.
  2. Run the INIT subcommand (if you have not already done so) to finish creation of the BART backup catalog, which results in the complete directory structure to which backups and WAL files are saved. This step must be done before restarting the database servers with enabled WAL archiving, otherwise the copy operation in the archive_command parameter of the postgresql.conf file or the postgresql.auto.conf file fails due to the absence of the target archive directory. When the directory structure is complete, the archived_wals subdirectory should exist for each database server.
  3. Start the Postgres database servers with archiving enabled. Verify that the WAL files are appearing in the archive_path. The archiving frequency is dependent upon other postgresql.conf configuration parameters. Check the Postgres database server log files to ensure there are no archiving errors. Archiving should be operational before taking a backup in order to ensure that the WAL files that may be created during the backup process are archived.
  4. Start the WAL scanner if you intend to take incremental backups. Since the WAL scanner processes the WAL files copied to the archive path, it is advantageous to commence the WAL scanning as soon as the WAL files begin to appear in the archive_path in order to keep the scanning in pace with the WAL archiving.
  5. Run the BART CHECK-CONFIG subcommand for each database server with the -s option specifying the server name. This ensures the database server is properly configured for taking backups.
  6. Create a full backup for each database server. The full backup establishes the starting point of when point-in-time recovery can begin and also establishes the initial parent backup for any incremental backups to be taken.

There are now a number of other BART management processes you may perform:

  • Execute the BACKUP subcommand to create additional full backups or incremental backups.
  • Use the VERIFY-CHKSUM subcommand to verify the checksum of the full backups.
  • Display database server information with the SHOW-SERVERS subcommand.
  • Display backup information with the SHOW-BACKUPS subcommand.
  • Compress the archived WAL files in the archive_path by enabling WAL compression in the BART configuration file and then invoking the MANAGE subcommand.
  • Determine and set the retention policy for backups in the BART configuration file.
  • Establish the procedure for using the MANAGE subcommand to enforce the retention policy for backups. This may include using cron jobs to schedule the MANAGE subcommand.

performing_a_restore_operation point_in_time_recovery_operation