mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
Add comments for backup and restore
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
# Creating `esbackup/kustomize-backbup` will create the `kustomize-backup` snapshot repository.
|
||||||
|
# Deleting `esbackup/kustomize-backbup` will delete the `kustomize-backup` snapshot repository and all the snapshots in the repository.
|
||||||
|
# Deleting `esbackup/kustomize-backbup` will NOT delete essnapshot and esrestore objects.
|
||||||
apiVersion: elasticsearch.cloud.google.com/v1alpha1
|
apiVersion: elasticsearch.cloud.google.com/v1alpha1
|
||||||
kind: ESBackup
|
kind: ESBackup
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ spec:
|
|||||||
- repository-gcs
|
- repository-gcs
|
||||||
- ingest-user-agent
|
- ingest-user-agent
|
||||||
- ingest-geoip
|
- ingest-geoip
|
||||||
|
# To set `gcpserviceaccount`,
|
||||||
|
# First, create and download a GCP service account into a json file, named `sakey.json` following the instruction:
|
||||||
|
# https://www.elastic.co/guide/en/elasticsearch/plugins/6.5/repository-gcs-usage.html#repository-gcs-using-service-account
|
||||||
|
# Second, create a secret for the service account using the following command:
|
||||||
|
# $ kubectl create secret generic kustomizesa --from-file=./sakey.json
|
||||||
gcpserviceaccount:
|
gcpserviceaccount:
|
||||||
name: kustomizesa
|
name: kustomizesa
|
||||||
config:
|
config:
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Creating `esrestore/kustomize-restore` will restore the `kuostmize` index in the `kustomize-snapshot` snapshot to a new index named `kusotmize-restore`.
|
||||||
|
# Deleting `esrestore/kustomize-restore` will not delete the restored index.
|
||||||
|
# Deleting `esrestore/kustomize-restore` should happen before deleting `essnapshot/kustomize-snapshot`.
|
||||||
apiVersion: elasticsearch.cloud.google.com/v1alpha1
|
apiVersion: elasticsearch.cloud.google.com/v1alpha1
|
||||||
kind: ESRestore
|
kind: ESRestore
|
||||||
metadata:
|
metadata:
|
||||||
@@ -6,7 +9,7 @@ spec:
|
|||||||
include_global_state: true
|
include_global_state: true
|
||||||
ignore_unavailable: true
|
ignore_unavailable: true
|
||||||
rename_pattern: kustomize
|
rename_pattern: kustomize
|
||||||
rename_replacement: kustomize-restore1
|
rename_replacement: kustomize-restore
|
||||||
essnapshot:
|
essnapshot:
|
||||||
name: kustomize-snapshot
|
name: kustomize-snapshot
|
||||||
escluster:
|
escluster:
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Creating `essnapshot/kustomize-snapshot` will create a snapshot named `kustomize-snapshot` in the `kustomize-backup` snapshot repository.
|
||||||
|
# Deleting `essnapshot/kustomize-snapshot` will delete the snapshot.
|
||||||
|
# Deleting `essnapshot/kustomize-snapshot` should happen before deleting `esbackup/kustomize-backup`.
|
||||||
apiVersion: elasticsearch.cloud.google.com/v1alpha1
|
apiVersion: elasticsearch.cloud.google.com/v1alpha1
|
||||||
kind: ESSnapshot
|
kind: ESSnapshot
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -3,22 +3,27 @@ Retrieve information about all registered snapshot repositories:
|
|||||||
curl -X GET "${ElasticSearchURL}:9200/_snapshot?pretty"
|
curl -X GET "${ElasticSearchURL}:9200/_snapshot?pretty"
|
||||||
```
|
```
|
||||||
|
|
||||||
Retrieve information about a given snapshot repository, `gcskustomize`:
|
Retrieve information about a given snapshot repository, `kustomize-backup`:
|
||||||
```
|
```
|
||||||
curl -X GET "${ElasticSearchURL}:9200/_snapshot/gcskustomize?pretty"
|
curl -X GET "${ElasticSearchURL}:9200/_snapshot/kustomize-backup?pretty"
|
||||||
```
|
```
|
||||||
|
|
||||||
Verify a snapshot repository, `gcskustomize`, manually:
|
Verify a snapshot repository, `kustomize-backup`, manually:
|
||||||
```
|
```
|
||||||
curl -X POST "${ElasticSearchURL}:9200/_snapshot/gcskustomize/_verify?pretty"
|
curl -X POST "${ElasticSearchURL}:9200/_snapshot/kustomize-backup/_verify?pretty"
|
||||||
|
```
|
||||||
|
|
||||||
|
List all the snapshots in a given snapshot repository:
|
||||||
|
```
|
||||||
|
curl -X GET "${ElasticSearchURL}:9200/_cat/snapshots/kustomize-backup?v&s=id&pretty"
|
||||||
```
|
```
|
||||||
|
|
||||||
Retrieve a summary information about a given snapshot:
|
Retrieve a summary information about a given snapshot:
|
||||||
```
|
```
|
||||||
curl -X GET "${ElasticSearchURL}:9200/_snapshot/gcskustomize/kustomize-snapshot?pretty"
|
curl -X GET "${ElasticSearchURL}:9200/_snapshot/kustomize-backup/kustomize-snapshot?pretty"
|
||||||
```
|
```
|
||||||
|
|
||||||
Retrieve a detailed information about a given snapshot:
|
Retrieve a detailed information about a given snapshot:
|
||||||
```
|
```
|
||||||
curl -X GET "${ElasticSearchURL}:9200/_snapshot/gcskustomize/kustomize-snapshot/_status?pretty"
|
curl -X GET "${ElasticSearchURL}:9200/_snapshot/kustomize-backup/kustomize-snapshot/_status?pretty"
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user