-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auto backup Signed-off-by: Anisur Rahman <[email protected]>
- Loading branch information
1 parent
4778ea1
commit 2b90413
Showing
64 changed files
with
2,677 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Backup & Restore MySQL | KubeStash | ||
menu: | ||
docs_{{ .version }}: | ||
identifier: guides-mysql-backup-stashv2 | ||
name: KubeStash (aka Stash 2.0) | ||
parent: guides-mysql-backup | ||
weight: 50 | ||
menu_name: docs_{{ .version }} | ||
--- |
17 changes: 17 additions & 0 deletions
17
docs/guides/mysql/backup/kubestash/auto-backup/examples/backupstorage.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: storage.kubestash.com/v1alpha1 | ||
kind: BackupStorage | ||
metadata: | ||
name: gcs-storage | ||
namespace: demo | ||
spec: | ||
storage: | ||
provider: gcs | ||
gcs: | ||
bucket: kubestash-qa | ||
prefix: blueprint | ||
secretName: gcs-secret | ||
usagePolicy: | ||
allowedNamespaces: | ||
from: All | ||
default: true | ||
deletionPolicy: WipeOut |
41 changes: 41 additions & 0 deletions
41
docs/guides/mysql/backup/kubestash/auto-backup/examples/customize-backupblueprint.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: core.kubestash.com/v1alpha1 | ||
kind: BackupBlueprint | ||
metadata: | ||
name: mysql-customize-backup-blueprint | ||
namespace: demo | ||
spec: | ||
usagePolicy: | ||
allowedNamespaces: | ||
from: All | ||
backupConfigurationTemplate: | ||
deletionPolicy: OnDelete | ||
# ============== Blueprint for Backends of BackupConfiguration ================= | ||
backends: | ||
- name: gcs-backend | ||
storageRef: | ||
namespace: demo | ||
name: gcs-storage | ||
retentionPolicy: | ||
name: demo-retention | ||
namespace: demo | ||
# ============== Blueprint for Sessions of BackupConfiguration ================= | ||
sessions: | ||
- name: frequent-backup | ||
sessionHistoryLimit: 3 | ||
scheduler: | ||
schedule: ${schedule} | ||
jobTemplate: | ||
backoffLimit: 1 | ||
repositories: | ||
- name: ${repoName} | ||
backend: gcs-backend | ||
directory: ${namespace}/${targetName} | ||
encryptionSecret: | ||
name: encrypt-secret | ||
namespace: demo | ||
addon: | ||
name: mysql-addon | ||
tasks: | ||
- name: logical-backup | ||
params: | ||
databases: ${targetedDatabases} |
37 changes: 37 additions & 0 deletions
37
docs/guides/mysql/backup/kubestash/auto-backup/examples/default-backupblueprint.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: core.kubestash.com/v1alpha1 | ||
kind: BackupBlueprint | ||
metadata: | ||
name: mysql-default-backup-blueprint | ||
namespace: demo | ||
spec: | ||
usagePolicy: | ||
allowedNamespaces: | ||
from: All | ||
backupConfigurationTemplate: | ||
deletionPolicy: OnDelete | ||
backends: | ||
- name: gcs-backend | ||
storageRef: | ||
namespace: demo | ||
name: gcs-storage | ||
retentionPolicy: | ||
name: demo-retention | ||
namespace: demo | ||
sessions: | ||
- name: frequent-backup | ||
sessionHistoryLimit: 3 | ||
scheduler: | ||
schedule: "*/5 * * * *" | ||
jobTemplate: | ||
backoffLimit: 1 | ||
repositories: | ||
- name: default-blueprint | ||
backend: gcs-backend | ||
directory: /default-blueprint | ||
encryptionSecret: | ||
name: encrypt-secret | ||
namespace: demo | ||
addon: | ||
name: mysql-addon | ||
tasks: | ||
- name: logical-backup |
15 changes: 15 additions & 0 deletions
15
docs/guides/mysql/backup/kubestash/auto-backup/examples/retentionpolicy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: storage.kubestash.com/v1alpha1 | ||
kind: RetentionPolicy | ||
metadata: | ||
name: demo-retention | ||
namespace: demo | ||
spec: | ||
default: true | ||
failedSnapshots: | ||
last: 2 | ||
maxRetentionPeriod: 2mo | ||
successfulSnapshots: | ||
last: 5 | ||
usagePolicy: | ||
allowedNamespaces: | ||
from: All |
25 changes: 25 additions & 0 deletions
25
docs/guides/mysql/backup/kubestash/auto-backup/examples/sample-mysql-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kubedb.com/v1alpha2 | ||
kind: MySQL | ||
metadata: | ||
name: sample-mysql-2 | ||
namespace: demo | ||
annotations: | ||
blueprint.kubestash.com/name: mysql-customize-backup-blueprint | ||
blueprint.kubestash.com/namespace: demo | ||
variables.kubestash.com/schedule: "*/10 * * * *" | ||
variables.kubestash.com/repoName: customize-blueprint | ||
variables.kubestash.com/namespace: demo | ||
variables.kubestash.com/targetName: sample-mysql-2 | ||
variables.kubestash.com/targetedDatabases: mysql | ||
spec: | ||
version: "8.2.0" | ||
replicas: 1 | ||
storageType: Durable | ||
storage: | ||
storageClassName: "standard" | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 50Mi | ||
terminationPolicy: WipeOut |
20 changes: 20 additions & 0 deletions
20
docs/guides/mysql/backup/kubestash/auto-backup/examples/sample-mysql.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: kubedb.com/v1alpha2 | ||
kind: MySQL | ||
metadata: | ||
name: sample-mysql | ||
namespace: demo | ||
annotations: | ||
blueprint.kubestash.com/name: mysql-default-backup-blueprint | ||
blueprint.kubestash.com/namespace: demo | ||
spec: | ||
version: "8.2.0" | ||
replicas: 1 | ||
storageType: Durable | ||
storage: | ||
storageClassName: "standard" | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 50Mi | ||
terminationPolicy: WipeOut |
Oops, something went wrong.