Difference between revisions of "Backup and Restore"

From PKC
Jump to navigation Jump to search
(Created page with "This page explains how to backup and restore all content data. Category:Process")
 
Line 1: Line 1:
This page explains how to backup and restore all content data.
=Introduction=
Before we can start relying on data, the repeatability of data content is the first layer of data security that must be protected.
 
==Importance==
To enable proper data security, convenient backup and restore procedure would be the first layer.
 
This MediaWiki instance already stores all data under [[mountPoint/images]] and [[mountPoint/mariadb]], these two directories store
all the data relevant to MediaWiki, including its uploaded media files, and textual data stored in the [[MariaDB]] database.
 
==Implementation==
The default [[up.sh]] shell script is a way to allow users to kickoff the program. This process does the following tasks:
 
# Before shutting down existing instance of docker services, it first asks the existing instance to backup the data.
# Then, use [[docker-compose down --volumes]] to shut down all the docker services.
# If the [[mountPoint/]] directory does not exist, yet, decompress [[InitialDataPackage.tar.gz]] to the mountPoint/ directory.
# When the mountPoint directory has the initial data content, start docker services, using docker-compose up -d
# The docker-compose program reads [[docker-compose.yml]] file to configure docker services.
# When the docker services start running, take the existing data in the directory, if UploadedFiles/ directory or XLPLATEST.xml are available, these data elements will be imported to the database.


[[Category:Process]]
[[Category:Process]]

Revision as of 17:00, 25 March 2021

Introduction

Before we can start relying on data, the repeatability of data content is the first layer of data security that must be protected.

Importance

To enable proper data security, convenient backup and restore procedure would be the first layer.

This MediaWiki instance already stores all data under mountPoint/images and mountPoint/mariadb, these two directories store all the data relevant to MediaWiki, including its uploaded media files, and textual data stored in the MariaDB database.

Implementation

The default up.sh shell script is a way to allow users to kickoff the program. This process does the following tasks:

  1. Before shutting down existing instance of docker services, it first asks the existing instance to backup the data.
  2. Then, use docker-compose down --volumes to shut down all the docker services.
  3. If the mountPoint/ directory does not exist, yet, decompress InitialDataPackage.tar.gz to the mountPoint/ directory.
  4. When the mountPoint directory has the initial data content, start docker services, using docker-compose up -d
  5. The docker-compose program reads docker-compose.yml file to configure docker services.
  6. When the docker services start running, take the existing data in the directory, if UploadedFiles/ directory or XLPLATEST.xml are available, these data elements will be imported to the database.