From aa84c1c07b44f4a951da440e2d2248d37a13532a Mon Sep 17 00:00:00 2001 From: Sandeep Sukhani Date: Thu, 19 Sep 2019 13:04:52 +0530 Subject: [PATCH] verify backups to work on latest list of backups when tables rotate, it creates a final backup of last active table. verify backups was not having that last backup in the list so this change makes sure it has latest list of backups --- tools/bigtable-backup/bigtable-backup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bigtable-backup/bigtable-backup.py b/tools/bigtable-backup/bigtable-backup.py index cf122ac472b68..576eeb060d50b 100644 --- a/tools/bigtable-backup/bigtable-backup.py +++ b/tools/bigtable-backup/bigtable-backup.py @@ -62,7 +62,10 @@ def ensure_backups(args): bigtable_backup_job_last_active_table_backup_time_seconds.set_to_current_time() num_backups_deleted = 0 - + + # list backups again to verify them below + backups = list_backups(args.destination_path) + print("Checking whether all the backups are created after their period is over and deleting old unwanted backups") for table_id, timestamps in backups.items(): table_number = int(table_id.rsplit("_", 1)[-1])