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

Troubleshooting errors when using NetBackup for PostgreSQL Agent

General guidelines to resolve problems

The following table includes steps that help you resolve problems you may encounter while using NetBackup for PostgreSQL Agent.

Table: General steps to resolve problems

Steps

Action

Description

Step1

Remember the error message

Error messages are usually the vehicles for telling you something went wrong. If you do not see an error on the command line, but still suspect a problem, check the logs and the reports. These can provide an error message that directly points to the problem. The logs and reports are essential troubleshooting tools.

Step 2

Identify what you were doing when the problem occurred.

Ask the following questions:

  • What operation was tried?

  • What method did you use?

  • What type of server platform and operating system was involved?

  • If your site uses both master server and media server, was it a master server or a media server?

  • If a client was involved, what type of client was it?

  • Have you performed the operation successfully in the past? If so, what is different now?

  • What is the service pack level?

  • Do you use operating system software with the latest fixes supplied, especially those required for use with NetBackup?

  • Is your device firmware at a level, or higher than the level, at which it has been tested according to the posted device compatibility lists?

Step 3

Record all information

Capture potentially valuable information.

  • The NetBackup logs.

  • The logs specific to NetBackup for PostgreSQL Agent logs.

  • The logs specific to NetBackup XBSA .

Step 4

Correct the problem

After you define the problem, use the information to correct it.

Step 5

Contact Technical Support

If you cannot solve the troubleshooting, contact the Technical support.

Troubleshooting errors using logs and reports

To troubleshoot the errors, you can refer to the NetBackup logs, NetBackup for PostgreSQL Agent logs, and the NetBackup XBSA logs. These logs are located at the following locations:

The NetBackup logs are located at:

  • install_path\NetBackup\logs\bprd

  • install_path\NetBackup\logs\bpcd

  • install_path\NetBackup\logs\user_ops\dbext\logs

You must enable the bprd and the bpcd log files. For more information, see the NetBackup Troubleshooting Guide.

The logs that are specific to NetBackup for PostgreSQL Agent are located at:

  • install_path\nbpgsql.log

The logs that are specific to NetBackup XBSA are located at:

  • <NetBackup_install_path>/netbackup/logs/exten_client

Troubleshooting NetBackup errors

For troubleshooting NetBackup errors, see Veritas NetBackup Troubleshooting Guide and the Veritas NetBackup Commands Reference Guide

Troubleshooting NetBackup for PostgreSQL Agent errors

Table: Troubleshooting NetBackup for PostgreSQL errors lists and describes the errors and the solutions to troubleshoot the problems while running the operations.

Table: Troubleshooting NetBackup for PostgreSQL errors

Problems

Description

Solution

The nbpgsql backup fails with the following error:

Unable to load postgresql library

You may encounter this problem when the nbpgsql.conf file is not updated with the following

  • postgresql library file location

  • PGSQL_LIB_INSTALL_PATH does not point to correctlibpq.so library version.

Verify the following and then run the backup again:

  • Add or update the PostgreSQL library file location in the nbpgsql.conf file.

  • Ensure that the PostgreSQL_LIB_INSTALL_PATH is set to the correct path. It should point to libpq.so library version.

  • Create a symbolic link libpq.so that points to the libpq.so.<n> where n is the PostgreSQL library version.

    For more information, See Post-installation requirements for NetBackup for PostgreSQL Agent.

The nbpgsql backup fails with the following error:

Unable to connect to the database

The nbpgsql backup fails when the nbpgsql.conf file is updated with invalid username or port number.

To add the appropriate database user name and port number

  • Configure the appropriate database user name and port number in the nbpgsql.conf file or provide the appropriate options with the nbpgsqlcommand.

    For more information, See The nbpgsql.conf configuration file.

The nbpgsql backup fails with the following error:

Unable to load xbsa.dll

The nbpgsql backup fails if the environment variable path is not updated with NetBackup bin directory.

To run a nbpgsql backup successfully

  • Update the environment variable path with NetBackup_install_path/bin.

The nbpgsql backup fails with the following error:

XBSA initiation failed

The nbpgsql backup fails if the nbpgsql.conf file is not updated with the required parameters.

To run the nbpgsql backup successfully

  • Configure the valid master server name, policy name, schedule type in the nbpgsql.conf file or from the command line.

  • Verify if there are communication errors between the nbpgsql agent and the NetBackup master server. For more information see the NetBackup Administration guide.

(Windows)VSS snapshot creation failed

The nbpgsql backup may fail when the user does not have the privileges to run the nbpgsql operations.

Run cmd.exe in Administrator mode.

The nbpgsql restore operation does not restore any data from the target NetBackup client.

The nbpgsql restore fails if the nbpgsql.conf file is not updated with the NetBackup client name and the target directory.

For a successful restore

  • Verify that the target directory is valid and empty.

  • Initiate the restore from the NetBackup source client.

  • Set the NetBackup client name and target directory parameters in the nbpgsql.conf file.

The nbpgsql backup fails with the following error:

(Linux)Error creating LVM snapshot

The nbpgsql backup may fail when the volume group does not have sufficient space for the snapshot.

To verify the space in the volume group

  1. Run the following command:

    $vgs

    The command displays the volume group details.

  2. Update the nbpgsql.conf file with the appropriate snapshot size. The snapshot should be equivalent to or more than the instance size.

Error messages after a successful backup:

<volume_group>/<snapshot_name> Read failure after 0 of 4096 at 29393616896: input or output error.

OR

<volume_group>/<snapshot_name>: read failure after 0 of 4096 at 4096: input or output error.

The nbpgsql backup gives these errors when the volume group contains the snapshots. You can list the snapshots and then remove them before you run the backup again.

Note:

nbpgsql created LVM snapshot names are prefixed with pgsqlsnap

To remove the snapshots

  1. Run the following command to list the existing snapshot:

    $lvs

    The command displays the snapshot details.

  2. To remove the snapshots, run the following command:

    $ lvremove -f <volume_group>/<snapshot_name>

The nbpgsql backup fails with the following error:

"Failed to load PostgreSQL Library"

You may encounter this problem when the nbpgsql.conf file is not updated with the following:

  • PostgreSQLlibrary file location.

  • The PGSQL_LIB_INSTALL_PATH does not point to libpq.so.

Verify the following and then run the backup again:

  • Add or update the PostgreSQL library file location in the nbpgsql.conf file.

    For more information, See The nbpgsql.conf configuration file.

  • Ensure that the PGSQL_LIB_INSTALL_PATHis set to the correct path. It should point to libpg.so.<n>, where n is the PostgreSQL library version.

  • Create a symbolic link libpq.so that points to the libpq.so.<n>, where <n> is the PostgreSQL library version.

The nbpgsql backup on Linux (LVM), fails with the following error:

Error unmounting the snapshot-Device or resource busy

OR

Error removing the snapshot-pgsqlsnap_<timestamp>

Note:

<timestamp> is the LVM snapshot time

The nbpgsql backup fails during an attempt to unmount the snapshot, the device, or when you remove the existing snapshots.

To unmount the snapshot

  1. Run the following command to list all mounted file systems:

    $ mount-l

  2. If the snapshot still exists, create a mount directory using the following command:

    $mount<mount_directory>

    Note:

    This directory is created in /mnt/<snapshot_name>. The prefix names for snapshot are pgsqlsnap.

  3. Run the following command to remove the mount directory:

    $rm -rf <mount_directory>

  4. Run the following command to remove the snapshot manually :

    1vremove -f <volume_group>/<snapshot_name>

Even after a successful restore, the PostgreSQL services, failed to start.

The restore operation is successful, only when you restore the backup on a machine that has the same minor version of PostgreSQL.

For example, if you back up a file from PostgreSQL version 9.6.x, then you must restore the file to a computer with PostgreSQL version 9.6.x.

  • Verify that the PostgreSQL agent and NetBackup are of same version for successful restore operations.

  • Verify that the PostgreSQL version from the backed up data is same as the PostgreSQL version on the computer where you want to restore the data.

The nbpgsql.conf file is missing after installing the agent on RHEL or SUSE

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, ./nbpgsql. This command creates the default nbpgsql.conf file.