From 71101770db54651a836a3cfefc40ac0b22879b4e Mon Sep 17 00:00:00 2001 From: Simon Kollberg Date: Tue, 27 Aug 2024 09:10:59 +0200 Subject: [PATCH] Pick base backup based on finish_time instead of start_time --- postgres-appliance/bootstrap/clone_with_wale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-appliance/bootstrap/clone_with_wale.py b/postgres-appliance/bootstrap/clone_with_wale.py index dbc0b38f..595d19e3 100755 --- a/postgres-appliance/bootstrap/clone_with_wale.py +++ b/postgres-appliance/bootstrap/clone_with_wale.py @@ -72,7 +72,7 @@ def choose_backup(backup_list, recovery_target_time): match_timestamp = match = None for backup in backup_list: - last_modified = parse(backup['start_time' if os.getenv('USE_WALG_RESTORE') == 'true' else 'last_modified']) + last_modified = parse(backup['finish_time' if os.getenv('USE_WALG_RESTORE') == 'true' else 'last_modified']) if last_modified < recovery_target_time: if match is None or last_modified > match_timestamp: match = backup