Veritas NetBackup™ for PostgreSQL Administrator's Guide

Last Published:
Product(s): NetBackup (8.2)
  1. Introduction to NetBackup for PostgreSQL
    1.  
      About NetBackup for PostgreSQL Agent
    2.  
      Features supported by NetBackup for PostgreSQL Agent
    3.  
      The NetBackup for PostgreSQL Agent package
    4.  
      About the License for NetBackup for PostgreSQL Agent
  2. Installing the NetBackup for PostgreSQL Agent
    1.  
      Planning the installation of NetBackup for PostgreSQL Agent
    2.  
      Verifying the operating systems and platforms
    3.  
      Installing prerequisites for NetBackup for PostgreSQL Agent
    4.  
      Post-installation requirements for NetBackup for PostgreSQL Agent
    5.  
      Describing the NetBackup for PostgreSQL Agent package
    6.  
      Installing the NetBackup for PostgreSQL Agent
    7.  
      Authenticating the password
    8.  
      Uninstalling the NetBackup for PostgreSQL Agent
  3. Configuring NetBackup for PostgreSQL
    1.  
      The nbpgsql.conf configuration file
    2.  
      Configuring PostgreSQL backups with DataStore policies
  4. NetBackup for PostgreSQL backup and restore
    1. About PostgreSQL backups
      1.  
        The postgresql.conf configuration file
    2.  
      Performing PostgreSQL backups
    3.  
      Validating the PostgreSQL backups
    4.  
      Querying the PostgreSQL backups
    5.  
      Deleting backup information from the NetBackup catalog files
    6.  
      About PostgreSQL restore
    7.  
      Performing the PostgreSQL restores
    8.  
      Redirected restores
    9.  
      Recovering the restores
    10.  
      Disaster recovery
  5. Troubleshooting for PostgreSQL
    1.  
      Troubleshooting errors when using NetBackup for PostgreSQL Agent
  6. Appendix A. NetBackup for PostgreSQL commands and conventions
    1.  
      About NetBackup for PostgreSQL Agent commands
    2.  
      NetBackup for PostgreSQL Agent command conventions
  7. Appendix B. NetBackup for PostgreSQL commands
    1.  
      nbpgsql -o backup
    2.  
      nbpgsql -o restore
    3.  
      nbpgsql -o query
    4.  
      nbpgsql -o delete

The nbpgsql.conf configuration file

The NetBackup for PostgreSQL configuration (nbpgsql.conf) file is contains the parameters that you must specify for the respective operations. It contains predefined settings and is located on the client. When parameters are not configured in the nbpgsql.conf file, then the default parameter value takes precedence. You can configure the parameters in the nbpgsql.conf file or set them on the command line, where the command line parameters take precedence. The nbpgsql.conf file keeps you from providing the parameters every time you run operations.

The nbpgsql.conf file is located in the following locations:

  • (Windows)

    install_path\NBPostgreSQLAgent_8.2_AMD64\nbpgsql.conf .

  • (Linux RHEL) install_path/NBPostgreSQLAgent_8.2_linuxR_x86/nbpgsql.conf

  • (Linux SUSE) install_path/NBPostgreSQLAgent_8.2_linuxS_x86/nbpgsql.conf

Creating the nbpgsql configuration file

Starting from NetBackup 8.2, the nbpgsql.conf file is not created by default when you install the agent on RHEL or SUSE. The existing configuration file is prevented from getting overwritten as the RPM installer simply overwrites any existing files in the destination directory /usr/NBPostgreSQLAgent/.

If the nbpgsql.conf file does not exist, you can create the file by running the backup utility command without any options. For example, run the ./nbpgsql command. This command creates the default nbpgsql.conf file.

Table: The nbpgsql.conf parameters lists the nbpgsql.conf file parameters:

Table: The nbpgsql.conf parameters

Parameters

Description

Required parameter for

Default value

DB_PORT

Configures the PostgreSQL database server port number on which the backup or the restore should be performed. The port number verifies the PostgreSQL service status.

Backups

When you do not specify the port number, the default is 5432.

DB_USER

Configures the PostgreSQL database user name.

Backups

When you do not specify the user name, the default is postgres.

PGSQL_LIB_INSTALL_PATH

(Linux) Configures the libpq.so binary path.

Backups

No default value.

MASTER_SERVER_NAME

Specifies the NetBackup master server for backups and restores.

Backups and restores

No default value.

POLICY_NAME

Specifies the DataStore policy name.

Backups

No default value.

SCHEDULE_NAME

Identifies the backup schedule that you configured while creating the DataStore policy.

Backups

When you do not specify the policy name, the defaults is Application Backup.

CLIENT_NAME

Defines the NetBackupclient that has the NetBackup for PostgreSQL Agent.

Redirected restores and query

When you do not specify the client name, the default is the current host.

SNAPSHOT_SIZE

(Linux) Specifies the snapshot size for LVM snapshots. Specify the snapshot size in kilobytes, megabytes, or gigabytes as KB, MB, or GB respectively.

LVM backups

When you do not specify the snapshot size, the default is MB.

DB_BACKUP_ID

DB_BACKUP_ID represents the backup image name. This parameter configures the backup file when you want to restore or delete a specific backup.

Restoring backups using the backup image name.

No default value.

PGSQL_TARGET_DIRECTORY

Specifies the destination directory where you want to restore the backups.

Restores

No default value.

NBPGSQL_LOG_LEVEL

The NBPGSQL_LOG_LEVEL parameter lets you set the logging level for the nbpgsql logs. For a particular logging level, all details at that level or lower are logged.

The nbpgsql debug logs includes the following verbose levels:

  • 1 - ERROR: Conditions that should be corrected, such as configuration errors.

  • 2 - WARN: Conditions that are not errors, but that might require special handling.

  • 3 - INFO: Informational messages.

  • 4 - DEBUG: Debugging the messages that is used for troubleshooting.

The log levels help to control the amount of information that you want to access for troubleshooting errors.

When you do not specify the log level, the default is level 1.

NBPGSQL_LOG_SIZE

Configures the nbpgsql log size in MB. The maximum size is 10MB. When the log size reaches the NBPGSQL_LOG_SIZE, it creates a new log with timestamp.

You can specify the value according to the events that you want to write into the logs.

When you do not specify the log size, the default is 10MB.