I have restored basic backup successfully of Postgres. However, after that I have tried to restore incremental backup of Postgres(it was a couple of write to test table), and it had a couple of WAL files and some WAL files with .backup at the end. I have tried to put them into my pg_wal archive directory, that I'm using in the following restore command at postgresql.conf:
wal_level = replica
max_connections = 100
archive_mode = on
archive_command = 'test ! -f /var/lib/postgresql/16/main/pg_wal/wal_archive/%f && cp %p /var/lib/postgresql/16/main/pg_wal/wal_archive/%f'
restore_command = 'cp /var/lib/postgresql/16/pg_wal/wal_archive/%f %p
After putting them into /var/lib/postgresql/16/pg_wal/wal_archive I have tried to restart a couple times postgresql, however my new added WAL files still was not applied. Worth to mention that it seems like restarts did not trigger recovery mode, as restore_command usually executed from that mode.
Any help or advices is greatly appreciated!