pg_tde_restore_encrypt
This is the Percona pg_tde 2.3.0 manual. For the paired build, backup tools and major upgrades, see PG TDE on Mimus.
The placeholder descriptions now match the tool’s built-in help. See site errata.
The pg_tde_restore_encrypt tool wraps a normal restore command from the WAL archive and writes them to disk in a format compatible with pg_tde.
This command is often use together with pg_tde_archive_decrypt.
How it works
- Replaces
%fand%pin the restore command with the WAL file name and temporary file path (in/dev/shm) - Runs the restore command to fetch the unencrypted WAL from the archive and write it to the temp file
- Encrypts the temp file and writes it to the destination path in PostgreSQL’s data directory
Usage
Parameter descriptions
SOURCE-NAME: name of the WAL file to retrieve from the archiveDEST-PATH: path where the encrypted WAL file should be writtenRESTORE-COMMAND: restore command to wrap;%fand%pare replaced with the WAL file name and path to write the unencrypted WAL, respectively
Options
-V, --version: show version information, then exit-?, --help: show help information, then exit
Any %f or %p parameter in RESTORE-COMMAND has to be escaped as %%f or %%p respectively if used as restore_command in postgresql.conf.
Examples
Using cp
Using PgBackRest
A deployment with WAL encryption is not supported unless archive_command uses pg_tde_archive_decrypt and restore_command uses pg_tde_restore_encrypt.
Disable the following pgBackRest features in the applicable pgBackRest configuration section: