Skip to content

Commit d88ae4a

Browse files
committed
Update Blog “how-to-backup-and-restore-stateful-applications-on-kubernetes-using-kasten-k10-in-hpe-greenlake-for-private-cloud-enterprise”
1 parent aae1179 commit d88ae4a

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

content/blog/how-to-backup-and-restore-stateful-applications-on-kubernetes-using-kasten-k10-in-hpe-greenlake-for-private-cloud-enterprise.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,12 @@ Click *Accept Terms* after specifying your email and company name, you will b
180180

181181
### Deploy MySQL database
182182

183-
In order to show backup and restore process, [the MySQL database](https://github.com/GuopingJia/mysql-app) will be deployed as a sample stateful application to the cluster.
183+
In order to show backup and restore process, an MySQL database from [my GitHub repo](https://github.com/GuopingJia/mysql-app) will be deployed as a sample stateful application to the cluster.
184184

185-
The MySQL database requires a persistent volume to store data. Here is the PVC YAML manifest files:
185+
1. Install MySQL application
186+
187+
188+
MySQL database requires a persistent volume to store data. Here is the PVC YAML manifest file:
186189

187190
```markdown
188191
$ cat mysql-app/base/mysql-pvc.yaml
@@ -201,7 +204,7 @@ spec:
201204
storage: 1Gi
202205
```
203206

204-
The YAML manifest files in the folder *base* will be used to install the MySQL applicaiton using [Kustomize](https://kustomize.io/).
207+
The YAML manifest files in the folder *base* will be used to install the MySQL application using [Kustomize](https://kustomize.io/).
205208

206209
```markdown
207210
$ tree mysql-app/base
@@ -250,7 +253,7 @@ NAME DESIRED CURRENT READY AGE
250253
replicaset.apps/mysql-6974b58d48 1 1 1 24s
251254
```
252255

253-
You can check the PVC and the PV created as part of application deployment:
256+
You can check the PV and the PVC created as part of application deployment:
254257

255258
```markdown
256259
$ kubectl get persistentvolumes
@@ -263,6 +266,8 @@ NAME STATUS VOLUME CAPACITY ACCES
263266
mysql-pvc Bound pvc-3e55e9b3-097f-4ddf-bdcb-60825a7905ec 1Gi RWO gl-sbp-frank-gl1-sstor01 9m50s
264267
```
265268

269+
2. Access MySQL database
270+
266271
In order to access MySQL database service using the mysql CLI, set first the port-forward of *service/mysql*:
267272

268273
```markdown
@@ -295,6 +300,28 @@ MySQL [(none)]> show databases;
295300
3 rows in set (0,282 sec)
296301
```
297302

303+
3. Populate MySQL database
304+
305+
306+
The MySQL database repo has the test folder that contains a list of scripts for populating data records and testing the contents:
307+
308+
```markdown
309+
$ tree mysql-app/test
310+
mysql-app/test
311+
├── employees.sql
312+
├── load_departments.dump
313+
├── load_dept_emp.dump
314+
├── load_dept_manager.dump
315+
├── load_employees.dump
316+
├── load_salaries1.dump
317+
├── load_salaries2.dump
318+
├── load_salaries3.dump
319+
├── load_titles.dump
320+
├── show_elapsed.sql
321+
├── test_employees_md5.sql
322+
└── test_employees_sha.sql
323+
```
324+
298325
Typing the following command to populate a sample *employees* data to the database:
299326

300327
```markdown
@@ -344,9 +371,6 @@ MySQL [(none)]> show databases;
344371
4 rows in set (0,237 sec)
345372
```
346373

347-
The MySQL database repo has the *test* folder that contains a list of scripts for populating data records and testing the contents.
348-
349-
```markdown
350374
$ mysql -h 127.0.0.1 -uroot -pCfeDemo@123 -P 42281 -t < test_employees_sha.sql
351375
+----------------------+
352376
| INFO |

0 commit comments

Comments
 (0)