Chat now with support
지원 담당자와 채팅

NetVault Backup Plug-in for PostgreSQL 12.3 - User Guide

Introducing NetVault Backup Plug-in for PostgreSQL Installing and removing the plug-in Configuring the plug-in Backing up data Restoring data Troubleshooting

Verifying installation of libpq library

The libpq library included in PostgreSQL contains a set of library functions that lets client programs submit queries to the PostgreSQL Server and receive the query results. Because the plug-in acts as a client and uses the libpq library, ensure that your PostgreSQL installation contains the libpq library, whether it installed on Linux, UNIX, or Windows. If the library is not installed, you might encounter a “Required Library Not Found” message while using the plug-in. For more information, see your PostgreSQL documentation.

Preparing the PostgreSQL Server to support continuous archiving and PITR

If you are using PostgreSQL Server 9.6 or later and you want to use the plug-in to perform Incremental Backups, also known as continuous archiving, and support point-in-time recovery (PITR), complete the following steps for your environment:

Example: C:\NetVault\PosgreSQL\Database1\WALfiles
2
Make sure that the PostgreSQL user for your environment has full access to the complete path for each staging directory, and make sure that the same PostgreSQL user has permission to access the NetVault Backup config, tmp  and trace-container directories.

In Windows, the PostgreSQL user might run under the predefined Network Service account.

a
Open the “postgresql.conf” file, which is located in the database cluster Data directory, so that you can update it.
b
Set archive_mode to on.
c
Enter an archive_command that copies the WAL file from the Database Cluster pg_wal directory to the staging directory.
This command runs whenever a WAL file is ready for archiving. You can use the wildcards %f, which represents the filename, and %p, which represents the full path. For more information, see Additional information for completing the archive_command segment.

The following examples show additional ways that you might configure archive_command.

The plug-in also includes utilities that you can use for the archive command. The applicable utility, vpgwalutil for Linux and UNIX and nvpgwalutil.exe for Windows, is located in the NetVault Backup installation bin directory. If you use a utility, use the following format:

If you use one of the utilities, enter the following parameters:

JobType=store, instructs the utility to copy the WAL Log into the stage directory
DatabaseCluster=<name> indicates the name of the database cluster that you intend to use when you add the cluster in the plug-in.

Adding a database cluster

To begin using Plug‑in for PostgreSQL, first add the target database cluster to the plug-in. If you are running more than one database cluster, follow this procedure for each database cluster to be protected using the plug-in.

1
In the Navigation pane of the NetVault Backup WebUI on the NetVault Backup Server, click Create Backup Job, and click Create New next to the Selections list.
3
Click Plug‑in for PostgreSQL, and select Add Database Cluster from the context menu.
4
In the Add Database Cluster dialog box, set the following parameters.
Database Cluster Name: Enter a name for the database cluster; by default, the local host name is used. This value is used in the NetVault Backup WebUI. Quest strongly recommends that you use a generic name for the PostgreSQL cluster instead of using a name associated with the machine on which the cluster resides. This generic name improves portability and policy management across all affected clients. When adding more than one cluster, ensure that a unique name is used for identification.
For example, if the machine name is test_postgresql_01_machine, and the suggested name for the PostgreSQL cluster is the same, change the name for the instance to something such as local_postgresql_database_cluster. You can then use the same name, local_postgresql_database_cluster, when you configure the other PostgreSQL clients. Therefore, the cluster name on all clients is local_postgresql_database_cluster.
Port: This field is preconfigured to port 5432, which is the default listener port for PostgreSQL. Enter the correct port number in this field, if PostgreSQL is configured to listen on any other port. When adding multiple database clusters, ensure that a different listener port is configured for each cluster.
Database SuperUser: This field defaults to the superuser postgres. If applicable, enter a different user with superuser privileges for the plug-in’s use.
Password: Enter the password associated with the user specified in the preceding field. Ensure that the password is correct. If the cluster is configured to use TRUST authentication for the HOST connection while using PASSWORD authentication for the LOCAL connection, the backups fail if the password is incorrect or blank. To avoid this issue, either use TRUST authentication for both the HOST and LOCAL connections, in which case no password is required, or use PASSWORD authentication for both items in the “pg_hba.conf” file, and provide the password here.
NOTE: If the “pg_hba.conf” file contains entries for both IPv4 and IPv6, configure the same authentication for each. For example, use TRUST authentication for both IPv4 and IPv6 connections.

You can use MD5 hash passwords.
PostgreSQL Bin Directory: Enter the complete path to the PostgreSQL bin directory. For example, this path is “C:\Program Files\PostgreSQL\10.0\bin” for a default installation of PostgreSQL version 10.0 on the Windows platform.
PostgreSQL Library Directory or Path (Linux/UNIX-based systems only): Enter the complete path to the directory that contains the “libpq.so” file or to the file itself, for example, “/usr/lib/libpq.so.5.0”.
PostgreSQL Data Directory: Specify the complete path to the directory that contains the configuration files “postgresql.conf,” “pg_hba.conf,” and “pg_ident.conf.” By default, PostgreSQL stores the configuration files in the data directory. For example, this path is “C:\Program Files\PostgreSQL\10.0\data” for a default installation of PostgreSQL version 10.0 on the Windows platform.
Database Used for Initial Connection: For the plug-in's initial connection, the postgres database is used by default. To use a different database for connecting to the server, specify the database name in this field.
Template Database Used During CREATE Database: The template specified in this field is used for creating an empty database during the restore process. Quest recommends that you use the default template0. Backups are performed relative to template0, which means that any languages and procedures added to template1 are included in the backup. As a result, if you are using customized template1, you must create the database from an empty template such as template0. Otherwise, errors due to duplicate definitions might occur during the restore process.
Default Character Set: From the list, select the Character Set Encoding that the plug-in uses to display the names of databases and tables in the set locale. The following table lists the supported encodings. If an incompatible encoding is configured, you cannot browse the tree, or perform backups or restores.

BIG5

Traditional Chinese

EUC_CN

Simplified Chinese

EUC_JP

Japanese

EUC_KR

Korean

EUC_TW

Traditional Chinese

GB18030

Simplified Chinese

LATIN1

SQL_ASCII

Any

SJIS

Japanese

UTF8

Any

IMPORTANT: The UTF8 and SQL_ASCII encodings can be used with any language, however, the support is limited to ASCII character set. If the database or table names contain non-ASCII characters, set a locale-specific encoding, for example, EUC_JP for Japanese. For more information, see http://www.postgresql.org/docs/9.2/static/multibyte.html.
5
If you are using PostgreSQL Server 9.6 or later and you want to use the File Level Data Copy option for archive-based backups and restores, complete the following fields:
PostgreSQL Directory for Current Log Files: The plug-in completes this field using the name of the directory used by your PosgreSQL Server. The default is pg_wal.
NOTE: PostgreSQL maintains a WAL file in the pg_wal subdirectory of the cluster’s data directory For PostgreSQL 9.x and earlier, the WAL file is located in the pg_xlog subdirectory of the data directory.
Temporary Directory to Stage Log Files: Enter the full path to the dedicated directory that you created previously.
An error message is displayed if an invalid entry is found. You can choose to ignore this message and click Save to add the database. The database cluster is added, however, note the following:
If the superuser name or password cannot be validated, further access is denied.
If the PostgreSQL Data Directory is invalid, while all other parameters are correctly configured, the backups of databases are completed but the backups of configuration files fail.
If the PostgreSQL Bin Directory is invalid, while all other parameters are correctly configured, you are able to submit a job but the job fails.

Correcting invalid parameters

If a parameter is not correctly configured, an error message is displayed. You can ignore this message and save the information. However, further access is denied or backup jobs might not complete successfully until you correct the error.

2
In the Add Database Cluster dialog box, enter the correct values for the parameters reported as invalid.
관련 문서