Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for backup and restore elasticsearch using kubestash #678

Merged
merged 9 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/guides/elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ KubeDB supports `Elasticsearch` provided by Elastic with `xpack` auth plugin. `O
- [Quickstart Kibana](/docs/guides/elasticsearch/elasticsearch-dashboard/kibana/index.md) with KubeDB Operator.
- [Quickstart OpenSearch-Dashboards](/docs/guides/elasticsearch/elasticsearch-dashboard/opensearch-dashboards/index.md) with KubeDB Operator.
- [Elasticsearch Clustering](/docs/guides/elasticsearch/clustering/combined-cluster/index.md) supported by KubeDB
- [Backup & Restore Elasticsearch](/docs/guides/elasticsearch/backup/overview/index.md) database using Stash.
- [Backup & Restore Elasticsearch](/docs/guides/elasticsearch/backup/stash/overview/index.md) database using Stash.
- Monitor your Elasticsearch database with KubeDB using [`out-of-the-box` builtin-Prometheus](/docs/guides/elasticsearch/monitoring/using-builtin-prometheus.md).
- Monitor your Elasticsearch database with KubeDB using [`out-of-the-box` Prometheus operator](/docs/guides/elasticsearch/monitoring/using-prometheus-operator.md).
- Use [private Docker registry](/docs/guides/elasticsearch/private-registry/using-private-registry.md) to deploy Elasticsearch with KubeDB.
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/elasticsearch/backup/_index.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Backup & Restore Elasticsearch
menu:
docs_{{ .version }}:
identifier: guides-es-backup
name: Backup & Restore (Stash)
name: Backup & Restore
parent: es-elasticsearch-guides
weight: 40
menu_name: docs_{{ .version }}
---
---
10 changes: 10 additions & 0 deletions docs/guides/elasticsearch/backup/kubestash/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Backup & Restore Elasticsearch | KubeStash
menu:
docs_{{ .version }}:
identifier: guides-es-backup-stashv2
name: KubeStash (aka Stash 2.0)
parent: guides-es-backup
weight: 50
menu_name: docs_{{ .version }}
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: storage.kubestash.com/v1alpha1
kind: BackupStorage
metadata:
name: s3-storage
namespace: demo
spec:
storage:
provider: s3
s3:
endpoint: us-east-1.linodeobjects.com
bucket: esbackup
region: us-east-1
prefix: elastic
secretName: s3-secret
usagePolicy:
allowedNamespaces:
from: All
default: true
deletionPolicy: Delete
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: core.kubestash.com/v1alpha1
kind: BackupBlueprint
metadata:
name: es-quickstart-custom-backup-blueprint
namespace: demo
spec:
usagePolicy:
allowedNamespaces:
from: All
backupConfigurationTemplate:
deletionPolicy: OnDelete
backends:
- name: s3-backend
storageRef:
namespace: ${namespace}
name: s3-storage
retentionPolicy:
name: demo-retention
namespace: ${namespace}
sessions:
- name: frequent-backup
scheduler:
schedule: ${schedule}
jobTemplate:
backoffLimit: 1
repositories:
- name: ${repoName}
backend: s3-backend
directory: /es/custom
encryptionSecret:
name: encrypt-secret
namespace: demo
addon:
name: elasticsearch-addon
tasks:
- name: logical-backup
params:
args: ${args}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: core.kubestash.com/v1alpha1
kind: BackupBlueprint
metadata:
name: es-quickstart-backup-blueprint
namespace: demo
spec:
usagePolicy:
allowedNamespaces:
from: All
backupConfigurationTemplate:
deletionPolicy: OnDelete
backends:
- name: s3-backend
storageRef:
namespace: demo
name: s3-storage
retentionPolicy:
name: demo-retention
namespace: demo
sessions:
- name: frequent-backup
scheduler:
schedule: "*/5 * * * *"
jobTemplate:
backoffLimit: 1
repositories:
- name: s3-elasticsearch-repo
backend: s3-backend
directory: /es/default
encryptionSecret:
name: encrypt-secret
namespace: demo
addon:
name: elasticsearch-addon
tasks:
- name: logical-backup
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,25 @@
apiVersion: kubedb.com/v1
kind: Elasticsearch
metadata:
name: es-quickstart-2
namespace: demo
annotations:
blueprint.kubestash.com/name: es-quickstart-backup-blueprint
blueprint.kubestash.com/namespace: demo
variables.kubestash.com/schedule: "*/5 * * * *"
variables.kubestash.com/repoName: s3-elasticsearch-repo
variables.kubestash.com/namespace: demo
variables.kubestash.com/args: --ignoreType=template,settings
spec:
version: xpack-8.15.0
enableSSL: true
replicas: 2
storageType: Durable
storage:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: Delete
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: kubedb.com/v1
kind: Elasticsearch
metadata:
name: es-quickstart
namespace: demo
annotations:
blueprint.kubestash.com/name: es-quickstart-backup-blueprint
blueprint.kubestash.com/namespace: demo
spec:
version: xpack-8.15.0
enableSSL: true
replicas: 2
storageType: Durable
storage:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: Delete
Loading
Loading