Difference between revisions of "Kubernetes Backup and Restore"

From PKC
Jump to navigation Jump to search
Line 31: Line 31:
  ~/mount/backup/images/mediafile_08_29_2021_1548.zip
  ~/mount/backup/images/mediafile_08_29_2021_1548.zip
  ---------------------------------------------------
  ---------------------------------------------------
The script will create files as shown above, once the process is complete, you can inspect the files in worker's node generated by issuing ls command
ls ~/mount/backup/images
ls ~/mount/backup/mariadb
which will show you the files generated as the backup script displayed.


==Performing the Restore==
==Performing the Restore==

Revision as of 15:52, 29 August 2021

Foreword

This document is prepared as administrator's guide of MediaWiki implementation on kubernetes to perform backup and restore. Backup and restore will cover for both database stored in mySQL and image media stored in MediaWiki file system.

What you need to perform the task is the console access to worker node of kubernetes' deployment.

Acessing your cluster

Use your credentials to access the worker node of the kubernetes deployment. All the data of the deployment is stored on ~\mount and all underneath directory. Please refer the below diagram.

~\mount
 |
 |- backup
    |- images
    |- mariadb
 |- restore
    |- images
    |- mariadb
 |- images
 |- mariadb

Please noted that backup files are stored in ~\mount\backup\, and files as the result of the backup process will be stored in respective folder.

Performing the Backup

To perform the backup, please log-in into master node of your kubernetes deployment using your credentials, and navigate to folder ~\CleanSlate\k8s_dep. At this folder you will find .\db-backup.sh shell script. This script will perform the backup process from mariadb and mediawiki pod and put the backup result on the worker's node folder as stated in above section.

When you issue the command

./db-backup.sh
---------------------------------------------------
This script will create database backup on folder
~/mount/backup/mariadb/cleanslate_bak_08_29_2021_1548.sql.gz
~/mount/backup/images/mediafile_08_29_2021_1548.zip
---------------------------------------------------

The script will create files as shown above, once the process is complete, you can inspect the files in worker's node generated by issuing ls command

ls ~/mount/backup/images
ls ~/mount/backup/mariadb

which will show you the files generated as the backup script displayed.

Performing the Restore