From 98886e07888deeb0c893c218c26895ce54f37f69 Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 30 Jul 2026 18:54:43 +0500 Subject: [PATCH] fix: [CPCAP-11936] add timestamp struct to backup --- services/pgbackrest-sidecar/pkg/backup/backup.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/pgbackrest-sidecar/pkg/backup/backup.go b/services/pgbackrest-sidecar/pkg/backup/backup.go index e47e9789..05398ca5 100644 --- a/services/pgbackrest-sidecar/pkg/backup/backup.go +++ b/services/pgbackrest-sidecar/pkg/backup/backup.go @@ -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 { @@ -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}