NetBackup102 WebUIGuide PostgreSQLAdmin
NetBackup102 WebUIGuide PostgreSQLAdmin
PostgreSQL Administrator's
Guide
Release 10.2
NetBackup™ Web UI PostgreSQL Administrator's
Guide
Last updated: 2023-03-17
Legal Notice
Copyright © 2023 Veritas Technologies LLC. All rights reserved.
Veritas, the Veritas Logo, and NetBackup are trademarks or registered trademarks of Veritas
Technologies LLC or its affiliates in the U.S. and other countries. Other names may be
trademarks of their respective owners.
This product may contain third-party software for which Veritas is required to provide attribution
to the third party (“Third-party Programs”). Some of the Third-party Programs are available
under open source or free software licenses. The License Agreement accompanying the
Software does not alter any rights or obligations you may have under those open source or
free software licenses. Refer to the Third-party Legal Notices document accompanying this
Veritas product or available at:
https://www.veritas.com/about/legal/license-agreements
The product described in this document is distributed under licenses restricting its use, copying,
distribution, and decompilation/reverse engineering. No part of this document may be
reproduced in any form by any means without prior written authorization of Veritas Technologies
LLC and its licensors, if any.
The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq.
"Commercial Computer Software and Commercial Computer Software Documentation," as
applicable, and any successor regulations, whether delivered by Veritas as on premises or
hosted services. Any use, modification, reproduction release, performance, display or disclosure
of the Licensed Software and Documentation by the U.S. Government shall be solely in
accordance with the terms of this Agreement.
Technical Support
Technical Support maintains support centers globally. All support services will be delivered
in accordance with your support agreement and the then-current enterprise technical support
policies. For information about our support offerings and how to contact Technical Support,
visit our website:
https://www.veritas.com/support
You can manage your Veritas account information at the following URL:
https://my.veritas.com
If you have questions regarding an existing support agreement, please email the support
agreement administration team for your region as follows:
Japan [email protected]
Documentation
Make sure that you have the current version of the documentation. Each document displays
the date of the last update on page 2. The latest documentation is available on the Veritas
website:
https://sort.veritas.com/documents
Documentation feedback
Your feedback is important to us. Suggest improvements or report errors or omissions to the
documentation. Include the document title, document version, chapter title, and section title
of the text on which you are reporting. Send feedback to:
You can also see documentation information or ask a question on the Veritas community site:
http://www.veritas.com/community/
https://sort.veritas.com/data/support/SORT_Data_Sheet.pdf
Contents
Index .................................................................................................................... 41
Chapter 1
Overview
This chapter includes the following topics:
Step 1 ■ Open a web For more information on Sign In see the Sign into the
browser and go NetBackup web UI in NetBackup Web UI
to the URL Administrator’s Guide.
■ Enter your Note: To perform the PostgreSQL administrator tasks,
credentials and the Default PostgreSQL Administrator role should
click Sign in. have the minimum required RBAC permissions.
■ On the left, click
Security > See “Default PostgreSQL Administrator” on page 16.
RBAC > Add.
■ Select Default
PostgreSQL
Administrator
and provide a
Role name,
Role
description,
required
permissions and
assign a webUI
user to this role.
Step 3 Add and manage See “Manage credentials for an instance” on page 12.
credentials.
Deploy NetBackup to protect PostgreSQL On a very high level to protect PostgreSQL instances and databases
instances and databases. you need:
PostgreSQL installed bin directory path should Verify if PostgreSQL installation bin path is set in environment variable.
be added to path environment variable. For Example:
Protecting PostgreSQL instances and See “Protect PostgreSQL instances and databases” on page 20.
databases.
Note: Add these environment variables to the user for which NetBackup backup is
to be run.
■ (optional) path - Add PostgreSQL bin path to this environment variable for running
queries and connecting to databases.
■ (optional) LIB_PQ_PATH - For Windows set this environment variable to provide
the location of libpq.dll library. For Linux set this environment variable to
provide the location of libpq.so library.
■ (optional) PG_PRO_BACKUP_DUMP_DIRECTORY - Set this environment
variable as temporary backup dump directory for non streaming backup. For
example, On Linux computer, user can set this environment variable to required
location using the command:
echo "export
PG_PRO_BACKUP_DUMP_DIRECTORY=/home/custom_dump_dir_location/" > >
~/.bashrc
For Windows, user can create new environment variable and add path of folder
location as:PG_PRO_BACKUP_DUMP_DIRECTORY=C:\custom_dump_dir_location
Managing PostgreSQL instances and databases 11
Add a PostgreSQL instance
3 Enter or use the up, down arrow keys to add details of Port number.
4 Click Next.
Note: You will be redirected to the Permissions page and you can also manage
credentials of the created instance.
5 Click Finish.
Note: The tab lists the names of instances that you have access to.
Note: If you delete an instance, all databases that are associated with the
removed PostgreSQL instance will also get deleted.
4 If you are sure that you want to delete the PostgreSQL Instance, click Remove.
Note: The range from which you may choose is 1 hour to 24 hours. To set the
autodiscovery frequency in minutes or seconds or to disable autodiscovery,
you must use the PostgreSQL autodiscovery API.
Chapter 3
Managing PostgreSQL
environment credentials
This chapter includes the following topics:
Type Permissions
Jobs View
Assets
Note: NetBackup verifies the current credentials for the selected PostgreSQL
instance.
If the credentials are not valid, NetBackup indicates Invalid under Credentials.
Note: When you update PostgreSQL instances, this action automatically starts
the discovery of the PostgreSQL instance.
Warning: Apply another credential to any asset that uses the credential you want
to delete or else backup and restore may fail for those assets.
User Privileges
To set the database user privileges, run the following command at PostgreSQL
command line:
ALTER USER "username" WITH SUPERUSER;
Protecting PostgreSQL instances and databases 20
Protect PostgreSQL instances and databases
Note: The RBAC role assigned to user must have access to the assets that you
want to manage and also to the protection plans you want to use.
5 Click Protect.
Note: This action allows custom protection for the asset and removes it from
the original protection plan. Any future changes to the original plan are not
applied to the asset. The customization operation cannot be reversed.
5 Click Protect.
Note: When you unsubscribe an asset from a protection plan, there is a possibility
that the asset displays Classic policy in the Protected By column on the web UI.
This situation can happen when an asset is subscribed to a protection plan and a
backup runs for that asset. Such assets get unsubscribed from the protection plan.
The web UI then displays Classic policy, that may or may not have an active policy
protecting the asset.
Note: If the asset has been backed up, but status indicates that it has not, See
“Error during the PostgreSQL instances and databases discovery phase”
on page 33.
3 If the asset is not protected, click Add protection to select a protection plan.
Chapter 5
Restoring PostgreSQL
Instances and Databases
This chapter includes the following topics:
■ Things to know before you restore the PostgreSQL instances and databases
■ Limitations
Note: In the calendar view, dates with available backups are indicated with a
green dot.
5 From the listed Backup images/ Recovery points, select the desired image
or recovery point.
Note: The backup images or recovery points are listed in rows with the
respective backup timestamp.
the alternate location will be the same as that of the original data that is
same folder and sub-folder setup.
■ Directory for Restore – This is PostgreSQL data directory. PostgreSQL
full backup data would be restored to the specified path.
■ Write Ahead logging Directory – PostgreSQL WAL files would be
restored in this directory. PostgreSQL incremental backup data would
be restored to the specified path.
Note: For LVM and VSS if Restore and recovery option is selected, then
contents of target data directory would be deleted by recovery operation.
13 Click Next.
14 On the Review tab, review the details and click Start recovery.
Note: In the calendar view, dates with available backups are indicated with a
green dot.
Restoring PostgreSQL Instances and Databases 26
Restore PostgreSQL instance and database
5 From the listed Backup images/ Recovery points, select the desired image
or recovery point.
Note: The backup images or recovery points are listed in rows with the
respective backup timestamp.
13 Click Next.
14 On the Review tab, review the details. For any changes you can edit recovery
target, recovery source and recovery options or click Start recovery.
Restoring PostgreSQL Instances and Databases 27
Restore target options
Target client Checks if target client is Target client and Target client name
connectivity accessible from restore client.
Target client Checks if the required space Target client alternate location
location space is available on target client
alternate location.
Note: Required space is total
size of selected file with space
required for restore and space
needed for logs and other
files.
Restore and recovery Restore backup images of PostgreSQL Global > NetBackup Assets >
asset. management > PostgreSQL
NetBackup backup Assets > Restore
This permission is required on PostgreSQL.
images > View to alternate
location
Global > NetBackup
management >
NetBackup backup
images > View
contents
Assets >
PostgreSQL assets
> Restore
Note: Post restore, change the attributes of the restored data directory and
files by using the following command:
attrib -S <restore_path>/*.* /S /D
4 Copy all the contents of restored data directory to PostgreSQL data directory.
5 Create an empty file in data directory and name it recovery.signal.
6 Start PostgreSQL service.
Restoring PostgreSQL Instances and Databases 30
Steps to perform recovery after restore operation
Limitations
■ Cross-platform recovery of individual files is not supported. The restore client
must be the same platform as the instances that you want to restore. Windows
instances can be restored using Windows operating systems and Linux instances
can be restored only using Linux operating systems.
■ For client platform and file system support and limitations, see
https://www.veritas.com/content/support/en_US/doc/NB_70_80_VE .
■ If a backup and a restore occur simultaneously on the same database, one or
both jobs can have unexpected results.
Note: If a backup or a restore exits with a non-zero NetBackup status code, one
possible cause is simultaneous jobs occurring on the same instance.
■ Restore job fails, if NetBackup does not have sufficient privileges or if there is
insufficient space in the client memory.
■ NetBackup does not support non-ASCII characters in target client location path.
Chapter 6
Troubleshooting
PostgreSQL operations
This chapter includes the following topics:
Credential validation failed. The host name is not valid NetBackup client. Ensure that the
Provide correct host name. hostname is registered client of NetBackup and it is white
listed.
Table 6-2 Error run into during the PostgreSQL instance and database
discovery phase
The PostgreSQL assets are not Run discover database and retry the database discovery manually.
discovered after the correct
■ Ensure that the update permission assigned to the logged in web UI user.
PostgreSQL instance credentials are
■ Contact Veritas Technical support and share nbwebservice logs from
added.
NetBackup master server and ncfnbcs logs from NetBackup client.
A plan with this name already exists. Protection plan with same name is already
present.
Storage disk pool is not present. Before adding protection, we need to add
storage unit.
This subscription must be reset to protection If subscription has been already modified, the
plan defaults before it can be customized. below warning message will be displayed.
■ User can reset subscription using 'Restore
original settings' button and then try to
customize subscription again.
Storage disk pool is not present Before adding protection, we need to add
storage unit.
The backup failed to back up the Verify the PostgreSQL service is up and running on client.
requested files
■ Contact Veritas Technical support and share bphdb and nbpgsql logs
from backup client.
Unable to change the Host while modifying If you cannot see the list of the host, you
the restore target or destination. might not have access to NetBackup Host in
RBAC.
Restore failed with below error: Restore If the database user provided for restore
initiated from XBSA Failed to query the operation is different from the backup
object... 17 operation database user. The permission of
file differs in the NetBackup file system and
hence restore fails.
Restore Image not found at alternate location No image was found on recovery host
on recovery host. alternate location.
GET
/netbackup/admin/discovery/workloads
/postgresql/status
POST
/netbackup/admin/discovery/workloads
/postgresql/allclientsdiscovery
API for PostgreSQL instances and databases 39
Using APIs to manage, protect or restore PostgreSQL
■ policyType is DataStore.
POST ■ Add scheduleName can have values like FULL_AUTO
/netbackup/servicecatalog/slos or INCR_AUTO for adding PostgreSQL instance.
■ keyword can have the following values to back up an
instance or database using different backup options:
POST
/netbackup/servicecatalog/slos/{sloId} • pg_dump
/subscriptions • pg_basebackup
• Snapshot
■ sloId is the identifier to protection plan
POST ■ selectionId is the AssetId which needs to be
/netbackup/servicecatalog/slos/{sloId}
subscribed with given sloId
/backup-now
After you create a protection plan, other processes like creating the schedule for
the policy or triggering the policy backup remain the same.
GET
/netbackup/wui/workloads/postgresql
/recovery-point-calendar-summary
API for PostgreSQL instances and databases 40
Using APIs to manage, protect or restore PostgreSQL