Chat now with support
Chat with Support

NetVault Plug-in for PostgreSQL 11.1 - User Guide

Setting restore options

1
On the Create Selection Set page, click Edit Plugin Options, and configure the applicable parameters on the Options tabs.
2
If you are restoring a Plain-Text SQL Script File backup, select the applicable options in the Pre-Restore Options section to specify what actions should be taken before the plug-in begins the restoration of a database:
Drop and Recreate Database: Select this option if you want to drop an existing database before restoring it from the backup. The database is created using the template specified in the Configure dialog box, Template Database Used during CREATE Database option. All existing data is discarded if this option is selected.
IMPORTANT: Regardless of whether the Drop and Recreate Database option is selected, the plug-in performs this action if you are restoring Template Databases.
Create Database Only: Select this option if you want to create a nonexistent database or to write data to the existing database. If the database is not found during restore, a new database is created. If the database is present, tables that are not part of the current restore job are not modified in any manner. If the selected tables are present in the database, the action is based on whether the Include Drop Object Commands option was selected during backup:
Include Drop Object Commands was selected: The table is dropped and re-created. The restored table only contains records that were present at the time of backup.
Include Drop Object Commands was not selected: For existing tables, you can use the Truncate Table(s) option to truncate existing records before restoring.
If Truncate Table(s) is not enabled, the plug-in attempts to insert all the backed-up records into the existing table. For tables on which the unique or primary keys have been defined, this action might result in constraint errors.
Truncate Table(s): Select this option if you want to delete all existing records from the tables and restore the records present in the backup saveset. After restoration, the tables only contain records that were present at the time of backup. Be aware of the following:
For existing tables, the “create table” command during psql execution fails. If the Stop on Error option is selected, the restore stops immediately on encountering this error. Select the Continue with Warnings option if the selected tables are present to ignore these errors and continue with table truncation and data restoration.
3
If you are restoring a Plain-Text SQL Script File backup, select the applicable options in the Restore Options section:
Stop on Error: Select this option if you want the restore to stop immediately when an error occurs. Changes made before the error are not rolled back, which leaves the database in an inconsistent state.
If the Disable Triggers option was enabled for backup and the restoration of the database stops in between, the plug-in does not enable triggers defined for the last table that caused the failure.
Restore as Single Transaction: Select this option if all commands in the database backup must complete successfully; otherwise, no changes are applied. The changes made are rolled back if an error occurs.
Continue Restore with Warnings: Select this option if you want the plug-in to ignore the errors and continue with the restore. The errors encountered during job execution are recorded as warning messages in the NetVault Backup logs and the job status is reported as “Completed with Warnings.”
IMPORTANT: If you select this option, review the logs after the job is complete to confirm that they only contain warnings pertaining to the following:

Primary or Unique Key Constraints Database Object (like table, language, user, role, and others) Already Exists

You can ignore these errors. However, if any other type of error message is noted, take corrective action, such as restoring the database again by selecting Drop and Recreate Database or Truncate Table(s).
4
If you are restoring a TAR Archive File or Custom Archive File backup, select the applicable options:
Stop on Error: Select this option if you want the restore to stop immediately when an error occurs. Changes made before the error are not rolled back, which leaves the database in an inconsistent state.
IMPORTANT: If this option is not selected, the plug-in ignores the errors and continues the job. The errors encountered during job execution are recorded as warning messages in the NetVault Backup logs and the job status is reported as “Completed with Warnings.” Review the logs after the job is complete to confirm that they only contain warnings pertaining to the following:

Primary or Unique Key Constraints Database Object (like table, language, user, role, and others) Already Exists

You can ignore these errors. However, if any other type of error message is noted, take corrective action, such as restoring the database again by selecting Drop and Recreate Database or Do Not Restore Data for Failed Create Table Commands.
Drop and Recreate Database: Select this option if you want to drop an existing database before restoring it from the backup. The database is created using the template specified in the Configure dialog box, Template Database Used during CREATE Database option.
You can also use the Exclude Access Privileges option with Create Database Only. To prevent restoration of access privileges, grant and revoke commands, select this option. Without this option selected, the restoration fails if the required users or roles do not exist.
IMPORTANT: Regardless of whether the Drop and Recreate Database option is selected, the plug-in performs this action if you are restoring Template Databases.
Create Database Only: Select this option if you want to create a nonexistent database or to write data to the existing database. If the database is not found during restore, a new database is created. If the database is present, tables that are not part of the current restore job are not modified in any manner. If the selected tables are present in the database, the action is based on the following options:
Drop Database Objects: To drop the existing table and restore it from the backup, select this option. If you select this option, you lose the existing records. The restored table only contains records that were present at the time of backup.
Restore Data for Failed Create Table Commands: If you want the plug-in to insert all the backed-up records into the existing table, select this option. For tables on which the unique or primary keys have been defined, this action might result in constraint errors.
If Stop on Error option is selected, the restoration of the database stops.
Do Not Restore Data for Failed Create Table Commands: With this option enabled, the existing tables are not restored.
You can also use the Exclude Access Privileges option with Create Database Only. To prevent restoration of access privileges, grant and revoke commands, select this option. Without this option selected, the restoration fails if the required users or roles do not exist.
Restore Data Only (No Schema Definitions): Select this option if you want to restore only the data from the backup and exclude the schema definitions. The restore fails if the target database or table does not exist.
IMPORTANT: Template Databases are not restored if you select this option.
You can also use the Disable Triggers option with Restore Data Only. Select this option if there are referential integrity checks or other triggers on the tables. This option temporarily disables triggers on the target tables during restore. After successful data restoration, the triggers are enabled. If Stop on Error is selected and the restoration of the database stops in between, the plug-in does not enable triggers defined for the last table that caused the failure.

Finalizing and submitting the job

The final steps include setting additional options on the Schedule, Source Options, and Advanced Options pages, submitting the job, and monitoring the progress through the Job Status and View Logs pages. These pages and options are common to all NetVault Backup Plug-ins. For more information, see the Quest NetVault Backup Administrator’s Guide.

1
To save the settings, click Ok, and then click Next.
2
In Job Name, specify a name for the job if you do not want to use the default setting.
3
In the Target Client list, select the machine on which you want to restore the data.
TIP: You can also click Choose, and then locate and select the applicable client in the Choose the Target Client dialog box.
4
Use the Schedule, Source Options, and Advanced Options lists to configure any additional required options.
5
Click Save or Save & Submit, whichever is applicable.
You can monitor progress on the Job Status page and view the logs on the View Logs page. For more information, see the Quest NetVault Backup Administrator’s Guide.

Performing advanced restore procedures

You can complete the following advanced procedures:

Restoring Global Objects

You can restore Global Objects from a Plain-Text SQL Script File version of a Full Database Cluster or Global Objects Only backup.

1
Select the Global Objects node from the backup saveset by following the instructions outlined in Selecting data for a restore.
2
Set the Restore Options by following the instructions outlined in Setting restore options and completing the following parameters:
Stop on Error: Select this option if you want the restore to stop immediately when an error occurs.
Restore as Single Transaction: Select this option if all commands in the database backup must complete successfully; otherwise, no changes are applied. The changes made are rolled back if an error occurs.
Continue Restore with Warnings: Select this option if you want the plug-in to ignore the errors and continue with the restore. The errors encountered during job execution are recorded as warning messages in the NetVault Backup logs and the job status is reported as “Completed with Warnings.”
IMPORTANT: PostgreSQL does not allow detailed restores of individual Global Objects, nor does it allow you to delete global objects before restoring. Therefore, when restoring Global Objects, all the Global Objects are restored. As a result, you encounter error messages about duplicate items during restore. Quest recommends that you restore Global Objects to an empty database cluster during disaster recovery or use the Continue Restore with Warnings option. If the Global Objects are being restored to recover dropped roles or users and the Continue Restore With Warnings option has been selected, warnings are logged in the NetVault Backup binary logs for roles or users that exist.

To restore Global Objects from a TAR Archive File or Custom Archive File backup, no additional Restore Options are available. Perform Step 1 and Step 3 to restore Global Objects from these backup formats.

For restoring the data to a different database cluster, see Restoring data to a different database cluster.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating