restore

package
v0.9.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL