Top
Enterprise Postgres 17 SP1 Operation Guide

5.8 Backing Up and Restoring/Recovering the Database

Fujitsu Enterprise Postgres enables you to use the five backup and recovery methods described below. Regardless of the method you use, you must back up the keystore and the entire opencryptoki token directory of the slot allocated to Fujitsu Enterprise Postgres at the same time.

Note that you must store the database and the keystore on separate data storage media. Storing both on the same data storage medium risks the danger of the encrypted data being deciphered if the medium is stolen.

Note

When recoverying the database, it is necessary to restore the configuration of both Crypto Express Adapter Card and openCryptoki which contains the same key as was set at the time of taking backup so that the recovered database can cooperate with hardware security module.

Backup and recovery using WebAdmin

Backup and recovery using the pgx_dmpall and pgx_rcvall commands

Example

  • Back up the database and the keystore on May 1, 2020.

    > pgx_dmpall -D /database/inst1
    > cp -p /key/store/location/keystore.ks /keybackup/keystore_20200501.ks
    > tar -cf token_directory_fep_20200501.tar /var/lib/opencryptoki/fep

    Specify the following in the pgx_dmpall command:

    • Specify the data storage destination in the -D option. If the -D option is omitted, the value of the PGDATA environment variable is used by default.

  • Recover the database and the keystore from the backup taken on May 1, 2020.

    > cp -p /keybackup/keystore_20200501.ks /key/store/location/keystore.ks
    > pgx_rcvall -B /backup/inst1 -D /database/inst1 --user-pin

    Specify the following in the pgx_rcvall command:

    • Specify the data storage destination in the -D option. If the -D option is omitted, the value of the PGDATA environment variable is used by default.

    • Specify the backup data storage directory in the -B option.

    • The --user-pin option prompts you to enter the user pin to open the keystore.

Dump and restore using SQL

File system level backup and restore

Continuous archiving and point-in-time recovery

See

  • Refer to "pg_ctl" under "Reference" in the PostgreSQL Documentation for information on the pg_ctl command.

  • Refer to "Reference" in the PostgreSQL Documentation for information on the following commands:

    • psql

    • pg_dump

    • pg_basebackup

  • Refer to the Reference for information on the following commands:

    • pgx_rcvall

    • pgx_dmpall

    • pg_dumpall