Book Image

PostgreSQL 9 High Availability Cookbook

By : Shaun Thomas
Book Image

PostgreSQL 9 High Availability Cookbook

By: Shaun Thomas

Overview of this book

Table of Contents (17 chapters)
PostgreSQL 9 High Availability Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Backing up a database with Barman


After Barman is installed, we should be able to leverage any of its capabilities using the barman command-line tool. For now, we will focus entirely on creating a backup, verifying that the new backup exists, and examining its contents.

Barman doesn't just produce backups, it also catalogs them extensively. We will use this to our advantage in this recipe to prove that Barman works as advertised.

Getting ready

This recipe depends on Barman being installed on a backup server. Please follow the Installing and configuring Barman recipe before continuing.

How to do it...

All steps should be executed as the barman system user on the pg-backup server that we were using in the previous recipe. Follow these steps to create, verify, and examine a Barman backup:

  1. Create the first backup with this command:

    barman backup primary
    
  2. Examine the list of backups with this command:

    barman list-backup primary
    
  3. View the metadata of the most recent backup with this command:

    barman show...