Skip to content

Commit 26e308d

Browse files
authored
Update Percona XtraDB Cluster Backup And Restore (#308)
Signed-off-by: SK Ali Arman <arman@appscode.com>
1 parent f4f78b9 commit 26e308d

5 files changed

Lines changed: 26 additions & 16 deletions

File tree

docs/addons/percona-xtradb/cluster/examples/backupconfiguration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
spec:
77
schedule: "*/5 * * * *"
88
task:
9-
name: perconaxtradb-backup-5.7
9+
name: perconaxtradb-backup-8.0
1010
repository:
1111
name: gcs-repo-xtradb-cluster
1212
target:

docs/addons/percona-xtradb/cluster/examples/restored-xtradb-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: restored-xtradb-cluster
55
namespace: demo
66
spec:
7-
version: "5.7-cluster"
7+
version: "8.0.40"
88
replicas: 3
99
authSecret:
1010
name: sample-xtradb-cluster-auth

docs/addons/percona-xtradb/cluster/examples/restoresession.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ metadata:
55
namespace: demo
66
spec:
77
task:
8-
name: perconaxtradb-restore-5.7
8+
name: perconaxtradb-restore-8.0
99
repository:
1010
name: gcs-repo-xtradb-cluster
11+
runtimeSettings:
12+
container:
13+
securityContext:
14+
runAsGroup: 1001
15+
runAsUser: 1001
1116
target:
1217
replicas: 3
1318
ref:

docs/addons/percona-xtradb/cluster/examples/sample-xtradb-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: sample-xtradb-cluster
55
namespace: demo
66
spec:
7-
version: "5.7-cluster"
7+
version: "8.0.40"
88
replicas: 3
99
storageType: Durable
1010
storage:

docs/addons/percona-xtradb/cluster/index.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ metadata:
5959
name: sample-xtradb-cluster
6060
namespace: demo
6161
spec:
62-
version: "5.7-cluster"
62+
version: "8.0.40"
6363
replicas: 3
6464
storageType: Durable
6565
storage:
@@ -86,7 +86,7 @@ Let's check if the database is ready to use,
8686
```bash
8787
$ kubectl get px -n demo sample-xtradb-cluster
8888
NAME VERSION STATUS AGE
89-
sample-xtradb-cluster 5.7-cluster Ready 7m46s
89+
sample-xtradb-cluster 8.0.40 Ready 7m46s
9090
```
9191

9292
The database is `Ready`. Verify that KubeDB has created a Secret and a Service for this database using the following commands,
@@ -159,7 +159,7 @@ spec:
159159
secret:
160160
name: sample-xtradb-cluster-auth
161161
type: kubedb.com/perconaxtradb
162-
version: "5.7-cluster"
162+
version: "8.0.40"
163163
```
164164

165165
Stash uses the AppBinding CRD to connect with the target database. It requires the following two fields to be set in the AppBinding's `.spec` section.
@@ -342,7 +342,7 @@ metadata:
342342
spec:
343343
schedule: "*/5 * * * *"
344344
task:
345-
name: perconaxtradb-backup-5.7
345+
name: perconaxtradb-backup-8.0
346346
repository:
347347
name: gcs-repo-xtradb-cluster
348348
target:
@@ -376,7 +376,7 @@ If everything goes well, the phase of the `BackupConfiguration` should be `Ready
376376
```bash
377377
$ kubectl get backupconfiguration -n demo
378378
NAME TASK SCHEDULE PAUSED PHASE AGE
379-
sample-xtradb-cluster-backup perconaxtradb-backup-5.7 */5 * * * * Ready 11s
379+
sample-xtradb-cluster-backup perconaxtradb-backup-8.0 */5 * * * * Ready 11s
380380
```
381381

382382

@@ -447,7 +447,7 @@ Now, wait for a moment. Stash will pause the BackupConfiguration. Verify that th
447447
```console
448448
$ kubectl get backupconfiguration -n demo sample-xtradb-cluster-backup
449449
NAME TASK SCHEDULE PAUSED PHASE AGE
450-
sample-xtradb-cluster-backup perconaxtradb-backup-5.7 */5 * * * * true Ready 50m
450+
sample-xtradb-cluster-backup perconaxtradb-backup-8.0 */5 * * * * true Ready 50m
451451
```
452452

453453
Notice the `PAUSED` column. Value `true` for this field means that the BackupConfiguration has been paused.
@@ -468,7 +468,7 @@ metadata:
468468
name: restored-xtradb-cluster
469469
namespace: demo
470470
spec:
471-
version: "5.7-cluster"
471+
version: "8.0.40"
472472
replicas: 3
473473
authSecret:
474474
name: sample-xtradb-cluster-auth
@@ -497,7 +497,7 @@ If you check the database status, you will see it is stuck in **`Provisioning`**
497497
```bash
498498
$ kubectl get px -n demo restored-xtradb-cluster
499499
NAME VERSION STATUS AGE
500-
restored-xtradb-cluster 5.7-cluster Provisioning 4m10s
500+
restored-xtradb-cluster 8.0.40 Provisioning 4m10s
501501
```
502502

503503
#### Create RestoreSession
@@ -516,9 +516,14 @@ metadata:
516516
namespace: demo
517517
spec:
518518
task:
519-
name: perconaxtradb-restore-5.7
519+
name: perconaxtradb-restore-8.0
520520
repository:
521521
name: gcs-repo-xtradb-cluster
522+
runtimeSettings:
523+
container:
524+
securityContext:
525+
runAsGroup: 1001
526+
runAsUser: 1001
522527
target:
523528
replicas: 3
524529
ref:
@@ -584,9 +589,9 @@ At first, check if the database has gone into **`Running`** state,
584589
```bash
585590
$ kubectl get px -n demo restored-xtradb-cluster --watch
586591
NAME VERSION STATUS AGE
587-
restored-xtradb-cluster 5.7-cluster Provisioning 3m36s
588-
restored-xtradb-cluster 5.7-cluster Provisioning 4m4s
589-
restored-xtradb-cluster 5.7-cluster Ready 4m4s
592+
restored-xtradb-cluster 8.0.40 Provisioning 3m36s
593+
restored-xtradb-cluster 8.0.40 Provisioning 4m4s
594+
restored-xtradb-cluster 8.0.40 Ready 4m4s
590595
```
591596

592597
Now, find out the database Pod,

0 commit comments

Comments
 (0)