MCPcopy Create free account
hub / github.com/wal-e/wal-e / backup_list

Method backup_list

wal_e/operator/backup.py:46–69  ·  view source on GitHub ↗

Lists base backups and basic information about them

(self, query, detail)

Source from the content-addressed store, hash-verified

44 return self.cinfo.connect(self.creds)
45
46 def backup_list(self, query, detail):
47 """
48 Lists base backups and basic information about them
49
50 """
51 import csv
52 from wal_e.storage.base import BackupInfo
53 bl = self._backup_list(detail)
54
55 # If there is no query, return an exhaustive list, otherwise
56 # find a backup instead.
57 if query is None:
58 bl_iter = bl
59 else:
60 bl_iter = bl.find_all(query)
61
62 # TODO: support switchable formats for difference needs.
63 w_csv = csv.writer(sys.stdout, dialect='excel-tab')
64 w_csv.writerow(BackupInfo._fields)
65
66 for bi in bl_iter:
67 w_csv.writerow([getattr(bi, k) for k in BackupInfo._fields])
68
69 sys.stdout.flush()
70
71 def database_fetch(self, pg_cluster_dir, backup_name,
72 blind_restore, restore_spec, pool_size):

Callers 1

mainFunction · 0.80

Calls 3

_backup_listMethod · 0.95
find_allMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected