NetBackup™ for PostgreSQL Administrator's Guide

Last Published:
Product(s): NetBackup & Alta Data Protection (10.4)

Troubleshooting errors when using NetBackup for PostgreSQL

General guidelines to resolve problems

The following table includes the 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 primary server and media server, was it a primary 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. These logs are located at the following locations:

The NetBackup primary server 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 client are located at:

  • install_path\netbackup\logs\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 NetBackup Troubleshooting Guide and the NetBackup Commands Reference Guide.

Troubleshooting NetBackup for PostgreSQL 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 library path is not provided in the nbpgsql command using the "-l" switch or the library path is provided but it does not contain libpq.so (Linux) or libpq.dll (Windows).

Verify the following and then run the backup again:

  • Ensure that you provide the correct postgresql library path, which contains the libpq.so (Linux) or libpq.dll (Windows) file.

  • (Linux) If libpq.so is not available, create a symbolic link named libpq.so that points to libpq.so.<n>.

  • (Windows) If libpq.dll is not available under bin directory of the PostgreSQL installation location, it may be available under lib directory.

The nbpgsql backup fails with the following error:

Unable to connect to the database

The PostgreSQL backup fails when the nbpgsql command is run with invalid database user name, port number, or password.

To add the appropriate database user name and port number:

  • Provide the database user name using the "-u" switch of the nbpgsql command.

  • Provide the database port number using the "-portnum" switch of nbpgsql command.

  • Provide the database password using the my.cnf (Linux) or my.ini (Windows) file.

See Authenticating the PostgreSQL environment password .

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 primary 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 primary server. For more information see the NetBackup Administrator's Guide Volume I.

(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 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:

    lvremove -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 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 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.

Restore or restore and recovery from pre-upgrade images fail with the following error message:

2816 DataStore policy restore

Restore or restore and recovery from pre-upgrade images fail with an error when media server and client versions mismatch.

Ensure that the client version and media server version are the same for restore or restore and recovery operation.