Skip to content

Commit 12adb4a

Browse files
author
Jeff McCormick
committed
update docs with backrest info
1 parent 8f8c134 commit 12adb4a

File tree

3 files changed

+28
-36
lines changed

3 files changed

+28
-36
lines changed

hugo/content/getting-started/_index.adoc

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,6 @@ pgo create cluster testcluster --service-type=LoadBalancer
140140
If not set, the ServiceType from *pgo.yaml* will be used, currently
141141
the default is ClusterIP.
142142

143-
To specify that you want a pgbackrest volume to be created for
144-
a given cluster, use the *--backrest* command flag:
145-
146-
....
147-
pgo create cluster withbkrest --backrest
148-
....
149-
150-
If the *pgo.yaml* Cluster.Backrest setting is enabled, that value
151-
will be used as the default value for all created clusters.
152-
153-
154143
=== pgo backup
155144

156145
You can start a backup job for a cluster as follows:
@@ -245,28 +234,47 @@ to make sure this is what you want to do. If you don't want to
245234
be prompted you can enter the *--no-prompt* command line flag.
246235

247236

248-
=== pgo backrest
237+
=== pgbackrest
238+
239+
The pgbackrest support started in Operator release 3.2, this is
240+
alpha support at this point and is intended to give users a preview
241+
of this feature support. The *backrestrepo* PVC, used by pgbackrest, has to be created on a RWX file system type in this release.
249242

250243
pgbackrest is a more advanced backup and restore capability
251244
exposed by the Operator. Read the following link for a full
252-
description of pgbackrest.
245+
description of pgbackrest. https://pgbackrest.org/
246+
247+
The pgbackrest support is enabled in a PG cluster by a user specifying
248+
the *--pgbackrest* command flag. To enable this feature for all
249+
PG clusters when created, you can specify a *pgbackrest* setting
250+
within the *pgo.yaml* configuration.
253251

254-
The pgbackrest support is enabled by a user specifying
255-
the *--backrest* command flag or specifying a default Backrest
256-
setting within the *pgo.yaml* configuration. Setting this
257-
value will cause the Operator to create a PVC specifically
252+
To create a PG cluster that enables pgbackrest specifically for that cluster, you would enter:
253+
....
254+
pgo create cluster mycluster --pgbackrest
255+
....
256+
257+
Setting this value will cause the Operator to create a PVC specifically
258258
dedicated for holding pgbackrest backups.
259259

260260
You can create a pgbackrest backup using the following command:
261261
....
262-
pgo backrest mycluster
262+
pgo backup mycluster --backup-type=pgbackrest
263263
....
264264

265265
You can obtain pgbackrest information using the following command:
266266
....
267-
pgo backrest mycluster --info
267+
pgo show backup mycluster --backup-type=pgbackrest
268268
....
269269

270+
You can restore from an existing cluster into a newly created PVC
271+
using the following command:
272+
....
273+
pgo restore withbr --to-cluster=restored --restore-type=backrest-restore-full
274+
pgo create cluster restored --custom-config=backrest-restore-withbr-to-restored --secret-from=withbr --pgbackrest
275+
....
276+
277+
270278
=== pgo scale
271279

272280
When you create a Cluster, you will see in the output a variety of Kubernetes objects were created including:

pgo/cmd/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func init() {
156156

157157
createIngestCmd.Flags().StringVarP(&IngestConfig, "ingest-config", "i", "", "The path of an ingest configuration file")
158158
createClusterCmd.Flags().BoolVarP(&PgpoolFlag, "pgpool", "", false, "If set, will cause the crunchy-pgpool container to be added to the database cluster")
159-
createClusterCmd.Flags().BoolVarP(&BackrestFlag, "backrest", "", false, "If set, will cause a backrest volume to be enabled for the database cluster")
159+
createClusterCmd.Flags().BoolVarP(&BackrestFlag, "pgbackrest", "", false, "If set, will cause a pgbackrest volume to be enabled for the database cluster")
160160
createClusterCmd.Flags().BoolVarP(&ArchiveFlag, "archive", "", false, "If set, will cause archive logging to be enabled for the database cluster")
161161
createClusterCmd.Flags().StringVarP(&PgpoolSecret, "pgpool-secret", "", "", "The name of a pgpool secret to use for the pgpool configuration.")
162162
createClusterCmd.Flags().BoolVarP(&MetricsFlag, "metrics", "m", false, "If set, will cause the crunchy-collect container to be added to the database pod")

pgo/cmd/show.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,6 @@ var ShowBackupCmd = &cobra.Command{
184184
},
185185
}
186186

187-
// showBackrestCmd represents the show backrest command
188-
var ShowBackrestCmd = &cobra.Command{
189-
Use: "backrest",
190-
Short: "Show backrest information",
191-
Long: `Show backrest information. For example:
192-
193-
pgo show backrest mycluser`,
194-
Run: func(cmd *cobra.Command, args []string) {
195-
if len(args) == 0 {
196-
fmt.Println("Error: cluster name(s) required for this command")
197-
} else {
198-
showBackrest(args)
199-
}
200-
},
201-
}
202-
203187
// ShowClusterCmd represents the show cluster command
204188
var ShowClusterCmd = &cobra.Command{
205189
Use: "cluster",

0 commit comments

Comments
 (0)