Install MariaDB Addon for Stash

Stash uses Function-Task model to backup databases. This Function-Task model enables Stash to extend its capability via addons. In order to backup MariaDB databases, you have to install MariaDB addon (stash-mariadb) for Stash. This addon creates necessary Function and Task definitions to backup/restore MariaDB database.

You can install the addon either as a helm chart or you can create only the YAMLs of the respective resources.

Using Helm 3

Run the following script to install stash-mariadb addon as a Helm chart using Helm 3.

curl -fsSL https://github.com/stashed/catalog/raw/v2020.12.17/deploy/helm3.sh | bash -s -- --catalog=stash-mariadb

Using Helm 2

Run the following script to install stash-mariadb addon as a Helm chart using Helm 2.

curl -fsSL https://github.com/stashed/catalog/raw/v2020.12.17/deploy/helm2.sh | bash -s -- --catalog=stash-mariadb

Using YAML

Run the following script to install stash-mariadb addon as Kubernetes YAMLs.

curl -fsSL https://github.com/stashed/catalog/raw/v2020.12.17/deploy/script.sh | bash -s -- --catalog=stash-mariadb

The above script uses Helm 3 for rendering the charts to generate the YAMLs.

Verify Installation

After installation is completed, this addon will create mariadb-backup-* and mariadb-restore-* Functions and Tasks for all supported MariaDB versions. To verify, run the following command:

$ kubectl get functions.stash.appscode.com
NAME                     AGE
mariadb-backup-10.5.8    25s
mariadb-restore-10.5.8   25s
pvc-backup               3m14s
pvc-restore              3m14s
update-status            3m14s

Also, verify that the Task have been created.

$ kubectl get tasks.stash.appscode.com
NAME                     AGE
mariadb-backup-10.5.8    101s
mariadb-restore-10.5.8   101s
pvc-backup               4m30s
pvc-restore              4m30s

Now, Stash is ready to backup MariaDB databases.

Customizing Installation

In order to install Function and Task only for a specific MariaDB version, use --version flag to specify the desired database version.

curl -fsSL https://github.com/stashed/catalog/raw/v2020.12.17/deploy/helm3.sh | bash -s -- --catalog=stash-mariadb --version=10.5.8

The flowing flags are available for customizing MariaDB addon installation:

FlagUsage
--versionSpecify a specific version of a specific addon to install. Use it along with --catalog flag.
--docker-registrySpecify the docker registry to use to pull respective addon images. Default Value: stashed.
--imageSpecify the name of the docker image to use for respective addons.
--image-tagSpecify the tag of the docker image to use for respective addon.
--backup-argsSpecify optional arguments to pass to mysqldump command during backup. These arguments apply to all MariaDB instances in this cluster. To set arguments for a specific MariaDB database instance, set args parameter in spec.task.params field of the respective BackupConfiguration.
--restore-argsSpecify optional arguments to pass to mysql command during restore. These arguments apply to all MariaDB instances in this cluster. To set arguments for a specific MariaDB database instance, set args parameter in spec.task.params field of the respective RestoreSession.