How to copy WAL files to the target environment?
Use any one of the following methods to copy the WAL files to the target environment:
Archiving the WAL files on the source environment and mounting (NFS) the archive directory on the target environment. Perform the following steps to enable WAL archiving:
Set the wal_level configuration parameter to replica or higher.
Set the archive_mode to on.
Use the archive_command parameter to copy the WAL files to an archive directory, ex: cp %p <ARCHIVE_DIRECTORY>/%f
Use the pg_receivewal utility on the target environment to start a background process. This process will collect the WAL files from the source database using streaming replication.
This process will require increasing the max_wal_senders count in the source configuration (postgresql.conf
) and collects only the WAL files from the time you start the process.
Copying the required WAL files from the archive directory on the source environment to the target environment.
Use unstructured files to mount the archive directory on the source environment as a dSource and later provision the VFiles on the target environment (Delphix recommended approach). With this approach, the archived WAL files can be kept in sync using the dSource SnapSync and VFiles refresh operations.
For more information, refer to the Unstructured files and app data section.