Lists base backups and basic information about them
(self, query, detail)
| 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): |
no test coverage detected