Restoring One or More PostgreSQL Databases

You can browse and restore backed up data for an entire database or for individual databases.

Use FSBased backupset, to restore the entire database.

Use DumpBased backupset, to restore the individual databases.

Before You Begin

  • Perform a backup.

  • Verify that the PostgreSQL software version on the destination is the same version or higher than the version of source.

  • You must create an instance on the destination client before initiating out of place restore.

  • For FSBased backup set, stop the PostgreSQL server and delete or rename the data directory, user tablespace directory, archive log directory and transaction log directory that is outside the data directory.

    Note

    For FSBased backup set, it is assumed that the data directory path and tablespace location in the source and the destination clients are the same. If they are different, then redirect the data directory to a different path by performing a redirect restore operation.

  • For FSBasedBackupSet, the source computer and destination computer should have the same operating system.

  • For a DumpBased backup set, do the following:

    • To back up roles and tablespaces in the database or table, enable backups for global objects in the database. The pg_dump utility that is used to perform DumpBased backup operation does not back up roles and tablespaces by default. If you did not have the global objects backed up already, to restore the data with the database user defined in the destination instance properties as the owner, create the additional settings bPGRestoreNoACL and bPGRestoreNoOwner before initiating the restore job.

    • To restore maintenance database, modify the maintenance database in the Instance details page to another database that will not be a part of the restore job.

    • The source computer and destination computer should have the same operating system.

    • Use parallel jobs to dump the PostgreSQL database.

    • Enter an optimal value for the number of parallel jobs based on the hardware setup of the server, client, and network. For more information, go to the -j command line argument in the PostgreSQL documentation website

Procedure

  1. From the navigation pane, go to Protect > Databases.

    The Instances page appears.

  2. Click the instance that you want to restore.

    The instance page appears.

  3. In the Recovery points calendar, select FSBasedBackupSet or DumpBasedBackupSet.

  4. Select a date from the calendar, and then click Restore.

    The Backup content page appears.

    Note

    Ensure that you have performed a successful backup on the selected date.

  5. To select the content to restore, from the Restore from default copy box, select a copy to perform the restore operation.

  6. Click Restore.

    The Restore options dialog box appears.

  7. Follow the steps for the type of restore operation you want to run:

    • To run an out-of-place restore operation, complete the following steps:

      • From the Destination Server list, select the destination server for the restore.

      • From the Destination instance list, select the destination instance for the restore.

    • For an in-place restore operation, the destination client and the destination instance remain the same as the source client and the source instance.

  8. In the Number of streams box, enter the number of data streams to use in the restore operation.

  9. For DumpBasedBackupSet, to restore database using parallel jobs, in the Number of parallel jobs box, enter the number of parallel jobs to restore the database.

  10. In the Staging Path box, enter the path to stage the database dump. The staging location must have sufficient space based on the selection of databases for restore. Maximum of four databases can be staged at a time.

  11. Select the Stage global objects file check box to stage the global objects information.

  12. Click Submit.

Loading...