Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestorableBackup ¶
type RestorableBackup struct { ID string `json:"id"` ReadableTime string `json:"readable_time"` DatabaseNames []string `json:"database_names"` TotalSizeBytes uint64 `json:"total_size_bytes"` }
RestorableBackup contains information about a backup that we found in Swift.
func (RestorableBackup) DownloadTo ¶
func (bkp RestorableBackup) DownloadTo(dirPath string, cfg *core.Configuration) ([]string, error)
DownloadTo downloads and unzips the dumps belonging to this backup into the given directory on the local filesystem. The return value is the list of files that were written.
func (RestorableBackup) Restore ¶
func (bkp RestorableBackup) Restore(cfg *core.Configuration) error
Restore downloads and restores this backup into the Postgres.
type RestorableBackups ¶
type RestorableBackups []*RestorableBackup
RestorableBackups adds convenience functions on a slice of RestorableBackup.
func ListRestorableBackups ¶
func ListRestorableBackups(cfg *core.Configuration) (RestorableBackups, error)
ListRestorableBackups searches for restorable backups in Swift.
func (RestorableBackups) FindByID ¶
func (backups RestorableBackups) FindByID(id string) *RestorableBackup
FindByID returns the backup with that id, or nil if no such backup is in this slice.
Click to show internal directories.
Click to hide internal directories.