mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 00:53:56 +00:00
wal-g: Update pg_backup_and_purge for wal-g format.
wal-g has a slihghtly different format than wal-e in its `backup-list` output; it only contains three columns: - `name` - `last_modified`, - `wal_segment_backup_start` ..rather than wal-e's plethora, most of which were blank: - `name` - `last_modified` - `expanded_size_bytes` - `wal_segment_backup_start` - `wal_segment_offset_backup_start` - `wal_segment_backup_stop` - `wal_segment_offset_backup_stop` Remove one argument from the split.
This commit is contained in:
committed by
Tim Abbott
parent
92f98292c1
commit
a5d63cfedf
@@ -56,7 +56,7 @@ backups: Dict[datetime, str] = {}
|
||||
lines = run(['env-wal-g', 'backup-list']).split("\n")
|
||||
for line in lines[1:]:
|
||||
if line:
|
||||
backup_name, date_str, _, _ = line.split()
|
||||
backup_name, date_str, _ = line.split()
|
||||
backups[dateutil.parser.parse(date_str)] = backup_name
|
||||
|
||||
one_month_ago = now - timedelta(days=30)
|
||||
|
||||
Reference in New Issue
Block a user