You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Barman allows you to specify a target timeline for recovery using the --target-tli option. This can be set to a numeric timeline ID or one of the special values latest (to recover to the most recent timeline in the WAL archive) and current (to recover to the timeline which was current when the backup was taken).
So I had a bunch of backups, created with /path/to/barman --config /path/to/barman.conf backup --wait localhost
I created some tables for testing and created another backup. My idea was to restore the previous backup to get the database without the recently created tables.
/path/to/barman --config /path/to/barman.conf recover localhost 20240410T162031 /path/to/database
Restore worked, I started PostgreSQL and the tables were still there, OK.
/path/to/barman --config /path/to/barman.conf recover localhost 20240410T162031 /path/to/database --target-tli=current
Restore worked again, I started PostgreSQL and the tables were still there. I expected to get a database without the tables, because the tables did no exists when the backup was created. I created the tables AFTER the backup.
This issue also works with Barman 3.9.
The text was updated successfully, but these errors were encountered:
JP95Git
changed the title
The issue still persists in Barman 3.10. Here are logs and more details.
--target-tli=current is not working as expected
Apr 10, 2024
I'm asking because if nothing happened between step 1 and 2 that generated a timeline change, then using the current value you are asking to recover everything.
Hi,
I am using PostgreSQL 16.1 and Barman 3.10. Backup works fine, but PITR does not work very well, as described here: #881
So I tried to use a different approach to set the recovery time and found this in the manual:
https://docs.pgbarman.org/release/3.10.0/
So I had a bunch of backups, created with
/path/to/barman --config /path/to/barman.conf backup --wait localhost
I created some tables for testing and created another backup. My idea was to restore the previous backup to get the database without the recently created tables.
/path/to/barman --config /path/to/barman.conf recover localhost 20240410T162031 /path/to/database
Restore worked, I started PostgreSQL and the tables were still there, OK.
/path/to/barman --config /path/to/barman.conf recover localhost 20240410T162031 /path/to/database --target-tli=current
Restore worked again, I started PostgreSQL and the tables were still there. I expected to get a database without the tables, because the tables did no exists when the backup was created. I created the tables AFTER the backup.
This issue also works with Barman 3.9.
The text was updated successfully, but these errors were encountered: