Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions services/pgbackrest-sidecar/pkg/backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type Backup struct {
Info Info `json:"info"`
Label string `json:"label"`
Type string `json:"type"`
Timestamp Timestamp `json:"timestamp"`
}

type Info struct {
Expand All @@ -58,6 +59,11 @@ type Status struct {
Message string `json:"message"`
}

type Timestamp struct {
Start int `json:"start"`
Stop int `json:"stop"`
}

func MakeFullBackup(timestamp string) error {
annotation := fmt.Sprintf("--annotation=timestamp=%s", timestamp)
args := []string{fmt.Sprintf("--stanza=%s", os.Getenv("PGBACKREST_STANZA")), "--repo=1", annotation}
Expand Down
Loading