Closed andremagui closed 3 months ago
I thought about using the new field as an alias for the recovery_staging_path but i think it would also make things a little confusing. Let me know about other ways of implementing this if you have any ideas.
Posted some suggestions. Note that unit tests are failing.
This works as expected.
$ barman recover postgres dev_postgres_incremental ~/data_recovery
ERROR: Cannot recover from backup 'dev_postgres_incremental' of server 'postgres': backup will be combined with pg_combinebackup in the barman host but no local staging path is provided. Either set local_staging_path in the Barman config or use the --local-staging-path argument.
$ barman recover postgres dev_postgres_incremental ~/data_recovery --local-staging-path /tmp/local_staging_path
Start combining backup via pg_combinebackup for backup 20240814T182116 on /tmp/local_staging_path
End combining backup via pg_combinebackup for backup 20240814T182116
Starting local restore for server postgres using backup 20240814T182116
Destination directory: /home/vagrant/data_recovery
Copying the base backup.
Copying required WAL segments.
Generating archive status files
Identify dangerous settings in destination directory.
Recovery completed (start time: 2024-08-19 12:55:40.870383+02:00, elapsed time: less than one second)
Your PostgreSQL server has been successfully prepared for recovery!
# Checked while `pg_combinebackup` was being executed
$ ls /tmp/local_staging_path/
20240814T182116
last force-push was made because i rebased on top of master!
Since the introduction of incremental backups in PostgreSQL 17, we created a new recovery executor to handle the operation. The plan was to reuse the
recovery_staging_path
argument/configuration that was designed to recover compressed backups PR #955 . After further review, it was decided that we would create a new argument/configuration specific to recover from incremental backups calledlocal_staging_path
.This PR:
parse_recovery_staging_path
toparse_staging_path
so we have a generic name to parse staging_paths and keep the same operation for both.parse_recovery_staging_path
with the new naming.References: BAR-269