Another example.
[barman@barman ~]$ barman list-backup db01
db01 20240905T205916 - F - Wed Sep 4 10:07:10 2024 - Size: 45.7 MiB - WAL Size: 0 B
db01 20240905T205714 - F - Wed Sep 4 10:06:35 2024 - Size: 45.7 MiB - WAL Size: 32.0 MiB
[barman@barman ~]$ barman recover db01 20240905T205714 --target-time="10:06:35" --remote-ssh-command="ssh postgres@192.1
68.1.35" /var/lib/pgsql/16/data
Starting remote restore for server db01 using backup 20240905T205714
Destination directory: /var/lib/pgsql/16/data
Remote command: ssh
post...@192.168.1.35WARNING: No time zone has been specified through '--target-time' command-line option. Barman assumed the same time zone from the Barman host.
Doing PITR. Recovery target time: '2024-09-05 10:06:35+02:00'
Copying the base backup.
Copying required WAL segments.
Generating recovery configuration
Identify dangerous settings in destination directory.
IMPORTANT
These settings have been modified to prevent data losses
postgresql.conf line 262: archive_command = false
Recovery completed (start time: 2024-09-05 21:00:45.771363+02:00, elapsed time: 5 seconds)
Your PostgreSQL server has been successfully prepared for recovery!
[barman@barman ~]$
PostgreSQL cannot start properly... Logs:
[postgres@db01 ~]$ cat 16/data/log/postgresql-Wed.log
2024-09-04 10:14:13.629 CEST [4634] LOG: starting PostgreSQL 16.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), 64-bit
2024-09-04 10:14:13.629 CEST [4634] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-09-04 10:14:13.629 CEST [4634] LOG: listening on IPv6 address "::", port 5432
2024-09-04 10:14:13.637 CEST [4634] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2024-09-04 10:14:13.651 CEST [4634] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2024-09-04 10:14:13.657 CEST [4638] LOG: database system was interrupted; last known up at 2024-09-04 10:06:30 CEST
2024-09-04 10:14:13.657 CEST [4638] LOG: creating missing WAL directory "pg_wal/archive_status"
cp: cannot stat 'barman_wal/00000002.history': No such file or directory
2024-09-04 10:14:16.041 CEST [4638] LOG: starting point-in-time recovery to 2024-09-05 10:06:35+02
2024-09-04 10:14:16.041 CEST [4638] LOG: starting backup recovery with redo LSN 0/10000028, checkpoint LSN 0/10000098, on timeline ID 1
2024-09-04 10:14:16.051 CEST [4638] LOG: restored log file "000000010000000000000010" from archive
2024-09-04 10:14:16.091 CEST [4638] LOG: redo starts at 0/10000028
2024-09-04 10:14:16.099 CEST [4638] LOG: restored log file "000000010000000000000011" from archive
2024-09-04 10:14:16.122 CEST [4638] LOG: restored log file "000000010000000000000012" from archive
2024-09-04 10:14:16.146 CEST [4638] LOG: restored log file "000000010000000000000013" from archive
cp: cannot stat 'barman_wal/000000010000000000000014': No such file or directory
2024-09-04 10:14:16.175 CEST [4638] LOG: completed backup recovery with redo LSN 0/10000028 and end LSN 0/10000138
2024-09-04 10:14:16.175 CEST [4638] LOG: consistent recovery state reached at 0/10000138
2024-09-04 10:14:16.175 CEST [4634] LOG: database system is ready to accept read-only connections
cp: cannot stat 'barman_wal/000000010000000000000014': No such file or directory
2024-09-04 10:14:16.213 CEST [4638] LOG: redo done at 0/130008E0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.12 s
2024-09-04 10:14:16.213 CEST [4638] LOG: last completed transaction was at log time 2024-09-04 10:07:52.502001+02
2024-09-04 10:14:16.213 CEST [4638] FATAL: recovery ended before configured recovery target was reached
2024-09-04 10:14:16.214 CEST [4634] LOG: startup process (PID 4638) exited with exit code 1
2024-09-04 10:14:16.214 CEST [4634] LOG: terminating any other active server processes
[postgres@db01 ~]$