WAL-E Clone should not use last_modified for recovery target time evaluation
See original GitHub issueHello everyone,
we’re currently facing problems with wal-e clone when copying backups from one point to another because the last modified flag is used for evaluation of the recovery target time. In our opinion, the start_time or finish_time flag should be used because it is insensitive against change of metadata because of copy or move operations. If our assumption is correct, I would create a PR for it.
def choose_backup(backup_list, recovery_target_time):
""" pick up the latest backup file starting before time recovery_target_time"""
match_timestamp = match = None
for backup in backup_list:
last_modified = parse(backup['last_modified'])
if last_modified < recovery_target_time:
if match is None or last_modified > match_timestamp:
match = backup
match_timestamp = last_modified
if match is not None:
return match['name']
https://github.com/zalando/spilo/blob/9cbf2094d7cf9eb95081c60db540b1d4e793a55f/postgres-appliance/bootstrap/clone_with_wale.py#L70
Thank you 😃
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Documentation: 11: 27.2. Recovery Target Settings - PostgreSQL
This parameter specifies the time stamp up to which recovery will proceed. The precise stopping point is also influenced by recovery_target_inclusive.
Read more >`--target-immediate` option copies all WAL files · Issue #205
This behavior is problematic in our case, since we have much more data in WAL files, than in the base backup, so it...
Read more >Cloning a DR VM - Commvault Documentation
To make a virtual machine available for continued operation, you can recover the VM at the destination using the create clone DR VM...
Read more >Disaster Recovery and Cloning - Crunchy Data
You may want to perform a point-in-time-recovery (PITR) to revert your database back to a state before a change occurred. Fortunately, PGO can...
Read more >Untitled
Vi copy lines to buffer, Roberta mancino imdb, Dreizylinder ford focus, ... Industry giant 2 download full, Do not call list market research,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Only if you are moving “files” around.
I don’t mind if you add some logic that will choose the field name based on conditions. Just keep in mind that wal-g shows time in a very strange format.
Because we simply used direct cloning without copying files before, I will no longer work on it but I think it’s a problem that should definitely be addressed independent of the cloud provider. E.g. AWS has the same behavior and I think a lot of people can get into trouble because of this.