Skip to content

Commit

Permalink
Add Redis backup restore doc for KubeStash (#675)
Browse files Browse the repository at this point in the history
* Keep separate section for stash

Signed-off-by: Neaj Morshad <[email protected]>

* Add redis kubestash doc intitial

Signed-off-by: Neaj Morshad <[email protected]>

* Add overview

Signed-off-by: Neaj Morshad <[email protected]>

* add logical backup restore complete doc

Signed-off-by: Neaj Morshad <[email protected]>

* add auto backup complete doc

Signed-off-by: Neaj Morshad <[email protected]>

* application backup complete doc

Signed-off-by: Neaj Morshad <[email protected]>

* customize backup restore job complete doc

Signed-off-by: Neaj Morshad <[email protected]>

* make build pass

Signed-off-by: Neaj Morshad <[email protected]>

* review changes

Signed-off-by: Neaj Morshad <[email protected]>

* fix index

Signed-off-by: Neaj Morshad <[email protected]>

* stash link -> kubestash link

Signed-off-by: Neaj Morshad <[email protected]>

---------

Signed-off-by: Neaj Morshad <[email protected]>
  • Loading branch information
Neaj-Morshad-101 authored Sep 24, 2024
1 parent e594406 commit d1e864c
Show file tree
Hide file tree
Showing 72 changed files with 3,470 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/guides/redis/backup/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Backup and Restore Redis
menu:
docs_{{ .version }}:
identifier: rd-guides-redis-backup
name: Backup
name: Backup & Restore
parent: rd-redis-guides
weight: 50
menu_name: docs_{{ .version }}
Expand Down
10 changes: 10 additions & 0 deletions docs/guides/redis/backup/kubestash/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Backup & Restore Redis | KubeStash
menu:
docs_{{ .version }}:
identifier: guides-rd-backup-stashv2
name: KubeStash (aka Stash 2.0)
parent: rd-guides-redis-backup
weight: 20
menu_name: docs_{{ .version }}
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: core.kubestash.com/v1alpha1
kind: BackupConfiguration
metadata:
name: sample-redis-backup
namespace: demo
spec:
target:
apiGroup: kubedb.com
kind: Redis
namespace: demo
name: sample-redis
backends:
- name: gcs-backend
storageRef:
namespace: demo
name: gcs-storage
retentionPolicy:
name: demo-retention
namespace: demo
sessions:
- name: frequent-backup
scheduler:
schedule: "*/5 * * * *"
jobTemplate:
backoffLimit: 1
repositories:
- name: gcs-redis-repo
backend: gcs-backend
directory: /redis
encryptionSecret:
name: encrypt-secret
namespace: demo
addon:
name: redis-addon
tasks:
- name: manifest-backup
- name: logical-backup
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: neaj-demo
prefix: demo
secretName: gcs-secret
usagePolicy:
allowedNamespaces:
from: All
default: true
deletionPolicy: Delete
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: core.kubestash.com/v1alpha1
kind: RestoreSession
metadata:
name: restore-sample-redis
namespace: demo
spec:
manifestOptions:
restoreNamespace: dev
# redis:
# db: true
dataSource:
repository: gcs-redis-repo
snapshot: latest
encryptionSecret:
name: encrypt-secret
namespace: demo
addon:
name: redis-addon
tasks:
- name: logical-backup-restore
# - name: manifest-restore
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: kubedb.com/v1
kind: Redis
metadata:
name: sample-redis
namespace: demo
spec:
version: 7.4.0
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: Delete
Loading

0 comments on commit d1e864c

Please sign in to comment.