I am trying to perform a Point-In-Time Recovery using the WAL_ARCHIVE process. The archive command is added to the postgresql.conf file and I can see the WAL being archived in the backup-archive directory. When I try to start the service I get PANIC: could not locate a valid checkpoint record
I am using the below step-by-step process.
- low level api basebackup
SELECT pg_start_backup('label', true, false);
- copying the data directory of my cluster
tar -zcvpf basebkPostgres20230110New.tgz /PostgreSQL/13/data
- closing my basebackup
SELECT * FROM pg_stop_backup(false, true);
- Stopping the postgres service
- Removing the current's cluster data directory
- Restoring the backed up data directory
- Removing the contents of the pg_wal directory
- Setting the restore_command in the postgresql.conf file
- Starting the postgres service