I see another questions about this but not clear or working for me.
I have one database PostgreSQL 12 version. I made one general backup approx 3 month ago, then turned on the WAL archive.
Here is my config file ( some important pieces):
max_connections = 100
archive mode = on
wal_level = replica
max_wal_size = 1GB
min_wal_size = 80MB
archive_command = 'copy "%p" "C:\\Backup\\wal files\\%f"'
restore_command = 'copy "C:\\Backup\\wal files\\%f" "%p"'
recovery_target_timeline = 'latest'
max_wal_senders = 10
wal_sender_timeout = 900s
The first issue, how the archive_command some reason not copy the WAL files to the desired directory. I found only in the pg_wal folder. I try to use \ and double \ . Another database server works...
My server stopped compeletly, new server arrived installed. And the old backup file restored. pg_restore.
Now, how can I restore the WAL files? I try the pg_waldump.
pg_waldump C:\Program Files\postgresql\12\data\pg_wal\0000000100000007000000F2 > D:\Backup\Ready\walbackupfile
And get back to me error message how the wal file not found. But hte file is there, and the name is correct also. I try to copy, and many another way, but not works.
Any idea helps.