Re: Postgres PITR: Recovery does not seem to fetch from Archive Dir
Rui DeSousa <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.admin |
|---|---|
| Message-ID | <[email protected]> |
> Dummy Data > > create table testPITR1 as select * from pg_class, pg_description; > select * from current_timestamp; Is this timestamp used in the recovery? > Kill existing db > > /usr/lib/postgresql/11/bin/pg_ctl -D /home/admin-12/Desktop/test2 -l /home/admin-12/Desktop/test2.log stop > mv test2 test2.bad > tar -xvzf test2.tar > sudo chown -R postgres:postgres test2 This is a normal shutdown, thus the WAL file should have been archive; was the latest WAL file archive? > Recovery conf > > nano /home/admin-12/Desktop/test2/recovery.conf > > restore_command = 'cp /home/admin-12/Desktop/test2_wal/%f %p' > recovery_target_time = '2019-08-21 16:14:11.175781+05:30’ If this timestamp was used from the prior step; then the tables testPITR2, testPITR3, and testPITR4 should not be restored as they where created after the given timestamp. > WITHOUT THIS STEP I CANNOT RECOVER Table 2,3,.. > > cp test2.bad/pg_wal/0* test2/pg_wal/ > Any tips? > What is you recovery process after issuing the cp command, a restore without recovery_target_time?