0

One database was hacked and deleted very important tables. I have a backup from last week and all the wal files I use to replicate to a remote server (that obviously replicated the drop table...).

I stop the server, created the recovery.conf file, do a pg_restore, then start the database.

In the postgresql-9.4-main.log I got:


2019-04-28 09:23:18 ART [3217-4] [ ] LOG:  record with zero length at 886/C8651240
2019-04-28 09:23:18 ART [3217-5] [ ] LOG:  redo is not required
cp: cannot stat `/mnt/wal/postgresql/9.4/wal/archive/0000000700000886000000C8': No such file or directory
cp: cannot stat `/mnt/wal/postgresql/9.4/wal/archive/00000008.history': No such file or directory
2019-04-28 09:23:18 ART [3217-6] [ ] LOG:  selected new timeline ID: 8
cp: cannot stat `/mnt/wal/postgresql/9.4/wal/archive/00000007.history': No such file or directory
2019-04-28 09:23:18 ART [3217-7] [ ] LOG:  archive recovery complete
2019-04-28 09:23:18 ART [3233-1] [ ] LOG:  autovacuum launcher started
2019-04-28 09:23:18 ART [3216-1] [ ] LOG:  database system is ready to accept connections
2019-04-28 09:23:18 ART [3235-1] [[local] [unknown]] [unknown]@[unknown] LOG:  incomplete startup packet

How can I recover the latest wal files?.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.