diff --git a/docs/examples/guides/v1beta1/backends/azure.yaml b/docs/examples/guides/v1beta1/backends/azure.yaml new file mode 100644 index 000000000..ef092cfb8 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/azure.yaml @@ -0,0 +1,11 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: azure-repo + namespace: demo +spec: + backend: + azure: + container: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: azure-secret diff --git a/docs/examples/guides/v1beta1/backends/b2.yaml b/docs/examples/guides/v1beta1/backends/b2.yaml new file mode 100644 index 000000000..e03411c56 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/b2.yaml @@ -0,0 +1,11 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: b2-repo + namespace: demo +spec: + backend: + b2: + bucket: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: b2-secret diff --git a/docs/examples/guides/v1beta1/backends/gcs.yaml b/docs/examples/guides/v1beta1/backends/gcs.yaml new file mode 100644 index 000000000..8dadcee21 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/gcs.yaml @@ -0,0 +1,11 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: gcs-repo + namespace: demo +spec: + backend: + gcs: + bucket: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: gcs-secret diff --git a/docs/examples/guides/v1beta1/backends/local_awsElasticBolckStore.yaml b/docs/examples/guides/v1beta1/backends/local_awsElasticBolckStore.yaml new file mode 100644 index 000000000..b561256d1 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_awsElasticBolckStore.yaml @@ -0,0 +1,13 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-awsebs + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + awsElasticBlockStore: # This AWS EBS volume must already exist. + volumeID: + fsType: ext4 + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/local_azureDisk.yaml b/docs/examples/guides/v1beta1/backends/local_azureDisk.yaml new file mode 100644 index 000000000..fb4a83992 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_azureDisk.yaml @@ -0,0 +1,13 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-azuredisk + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + azureDisk: + diskName: stash.vhd + diskURI: https://someaccount.blob.microsoft.net/vhds/stash.vhd + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/local_emptyDir.yaml b/docs/examples/guides/v1beta1/backends/local_emptyDir.yaml new file mode 100644 index 000000000..cac13c8e6 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_emptyDir.yaml @@ -0,0 +1,11 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-emptydir + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + emptyDir: {} + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/local_gcePersistentDisk.yaml b/docs/examples/guides/v1beta1/backends/local_gcePersistentDisk.yaml new file mode 100644 index 000000000..9409337d5 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_gcePersistentDisk.yaml @@ -0,0 +1,13 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-gcepersistentdisk + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + gcePersistentDisk: + pdName: stash-repo + fsType: ext4 + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/local_hostPath.yaml b/docs/examples/guides/v1beta1/backends/local_hostPath.yaml new file mode 100644 index 000000000..aad97167b --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_hostPath.yaml @@ -0,0 +1,12 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-hostpath + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + hostPath: + path: /data/stash-test/repo + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/local_nfs.yaml b/docs/examples/guides/v1beta1/backends/local_nfs.yaml new file mode 100644 index 000000000..5d2bdb5f4 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_nfs.yaml @@ -0,0 +1,13 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-nfs + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + nfs: + server: "nfs-service.storage.svc.cluster.local" # use you own NFS server address + path: "/" # this path is relative to "/exports" path of NFS server + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/local_pvc.yaml b/docs/examples/guides/v1beta1/backends/local_pvc.yaml new file mode 100644 index 000000000..aa1d9f393 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-pvc + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + persistentVolumeClaim: + claimName: repo-pvc + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/local_storageOS.yaml b/docs/examples/guides/v1beta1/backends/local_storageOS.yaml new file mode 100644 index 000000000..2905a5c32 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/local_storageOS.yaml @@ -0,0 +1,13 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-storageos + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + storageos: + volumeName: stash-vol01 # The `stash-vol01` volume must already exist within StorageOS in the `demo` namespace. + fsType: ext4 + storageSecretName: local-secret diff --git a/docs/examples/guides/v1beta1/backends/rest.yaml b/docs/examples/guides/v1beta1/backends/rest.yaml new file mode 100644 index 000000000..de74aae94 --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/rest.yaml @@ -0,0 +1,10 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: rest-repo + namespace: demo +spec: + backend: + rest: + url: http://rest-server.demo.svc:8000/stash-backup-demo + storageSecretName: rest-secret diff --git a/docs/examples/guides/v1beta1/backends/s3.yaml b/docs/examples/guides/v1beta1/backends/s3.yaml new file mode 100644 index 000000000..260e88b6a --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/s3.yaml @@ -0,0 +1,12 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: s3-repo + namespace: demo +spec: + backend: + s3: + endpoint: s3.amazonaws.com # use server URL for s3 compatible other storage service + bucket: stash-demo + prefix: /backup/demo/deployment/stash-demo + storageSecretName: s3-secret diff --git a/docs/examples/guides/v1beta1/backends/swift.yaml b/docs/examples/guides/v1beta1/backends/swift.yaml new file mode 100644 index 000000000..9a817f31d --- /dev/null +++ b/docs/examples/guides/v1beta1/backends/swift.yaml @@ -0,0 +1,11 @@ +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: swift-repo + namespace: demo +spec: + backend: + swift: + container: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: swift-secret diff --git a/docs/examples/rest/repo.yaml b/docs/examples/rest/repo.yaml index 73ebe4a30..c6f387070 100644 --- a/docs/examples/rest/repo.yaml +++ b/docs/examples/rest/repo.yaml @@ -1,3 +1,16 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: rest-pvc + namespace: demo +spec: + storageClassName: standard + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- apiVersion: v1 kind: Pod metadata: @@ -12,6 +25,13 @@ spec: ports: - name: http-1 containerPort: 8000 + volumeMounts: + - name: storage + mountPath: /data + volumes: + - name: storage + persistentVolumeClaim: + claimName: rest-pvc # kubectl logs -f -n demo rest-server # kubectl exec -it -n demo rest-server create_user myuser # kubectl create secret generic rest-secret -n demo --from-file=./RESTIC_PASSWORD --from-file=./REST_SERVER_USERNAME --from-file=./REST_SERVER_PASSWORD @@ -29,17 +49,16 @@ spec: name: http-1 protocol: TCP targetPort: 8000 - type: NodePort selector: app: rest-server --- apiVersion: stash.appscode.com/v1alpha1 kind: Repository metadata: - name: hello-repo + name: rest-repo namespace: demo spec: backend: rest: - url: http://172.17.0.4:8000/hello-prefix - storageSecretName: rest-secret \ No newline at end of file + url: http://rest-server.demo.svc:8000/stash/backup/demo + storageSecretName: rest-secret diff --git a/docs/guides/latest/backends/_index.md b/docs/guides/latest/backends/_index.md new file mode 100644 index 000000000..8b74cc71a --- /dev/null +++ b/docs/guides/latest/backends/_index.md @@ -0,0 +1,10 @@ +--- +title: Backends | Stash +menu: + product_stash_0.8.3: + identifier: backend + name: Supported Backends + parent: latest-guides + weight: 10 +menu_name: product_stash_0.8.3 +--- diff --git a/docs/guides/latest/backends/azure.md b/docs/guides/latest/backends/azure.md new file mode 100644 index 000000000..91ba087bc --- /dev/null +++ b/docs/guides/latest/backends/azure.md @@ -0,0 +1,85 @@ +--- +title: Azure Backend | Stash +description: Configure Stash to use Microsoft Azure Storage as Backend. +menu: + product_stash_0.8.3: + identifier: backend-azure + name: Azure Blob Storage + parent: backend + weight: 40 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +# Microsoft Azure Storage + +Stash supports Microsoft's [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) as a backend. This tutorial will show you how to use this backend. + +In order to use Azure Blob Storage as backend, you have to create a `Secret` and a `Repository` object pointing to the desired blob container. + +#### Create Storage Secret + +To configure storage secret for this backend, following secret keys are needed: + +| Key | Type | Description | +| -------------------- | ---------- | ---------------------------------------------------------- | +| `RESTIC_PASSWORD` | `Required` | Password that will be used to encrypt the backup snapshots | +| `AZURE_ACCOUNT_NAME` | `Required` | Azure Storage account name | +| `AZURE_ACCOUNT_KEY` | `Required` | Azure Storage account key | + +Create storage secret as below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ echo -n '' > AZURE_ACCOUNT_NAME +$ echo -n '' > AZURE_ACCOUNT_KEY +$ kubectl create secret generic -n demo azure-secret \ + --from-file=./RESTIC_PASSWORD \ + --from-file=./AZURE_ACCOUNT_NAME \ + --from-file=./AZURE_ACCOUNT_KEY +secret/azure-secret created +``` + +### Create Repository + +Now, you have to create a `Repository` crd. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. + +Following parameters are available for `azure` backend. + +| Parameter | Type | Description | +| ---------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `azure.container` | `Required` | Name of Storage container. | +| `azure.prefix` | `Optional` | Path prefix inside the container where backed up data will be stored. | +| `azure.maxConnections` | `Optional` | Maximum number of parallel connections to use for uploading backup data. By default, Stash will use maximum 5 parallel connections. | + +Below, the YAML of a sample `Repository` crd that uses an Azure Blob container as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: azure-repo + namespace: demo +spec: + backend: + azure: + container: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: azure-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/azure.yaml +repository/azure-repo created +``` + +Now, we are ready to use this backend to backup our desired data using Stash. + +## Next Steps + +- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). +- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). +- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). diff --git a/docs/guides/latest/backends/b2.md b/docs/guides/latest/backends/b2.md new file mode 100644 index 000000000..6799f6577 --- /dev/null +++ b/docs/guides/latest/backends/b2.md @@ -0,0 +1,85 @@ +--- +title: Backblaze B2 Backend | Stash +description: Configure Stash to use Backblaze B2 as Backend. +menu: + product_stash_0.8.3: + identifier: backend-b2 + name: Backblaze B2 + parent: backend + weight: 70 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +# Backblaze B2 + +Stash supports Backblaze's [B2 Cloud Storage](https://www.backblaze.com/b2/cloud-storage.html) as a backend. This tutorial will show you how to use this backend. + +In order to use Backblaze B2 Cloud Storage as backend, you have to create a `Secret` and a `Repository` object pointing to the desired B2 bucket. + +#### Create Storage Secret + +To configure storage secret for this backend, following secret keys are needed: + +| Key | Type | Description | +| ----------------- | ---------- | ----------------------------------------------------------- | +| `RESTIC_PASSWORD` | `Required` | Password that will be used to encrypt the backup snapshots. | +| `B2_ACCOUNT_ID` | `Required` | Backblaze B2 account id. | +| `B2_ACCOUNT_KEY` | `Required` | Backblaze B2 account key. | + +Create storage secret as below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ echo -n '' > B2_ACCOUNT_ID +$ echo -n '' > B2_ACCOUNT_KEY +$ kubectl create secret generic -n demo b2-secret \ + --from-file=./RESTIC_PASSWORD \ + --from-file=./B2_ACCOUNT_ID \ + --from-file=./B2_ACCOUNT_KEY +secret/b2-secret created +``` + +### Create Repository + +Now, you have to create a `Repository` crd. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. + +Following parameters are available for `b2` backend, + +| Parameter | Type | Description | +| ------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `b2.bucket` | `Required` | Name of the B2 bucket. | +| `b2.prefix` | `Optional` | Path prefix inside the bucket where the backed up data will be stored. | +| `b2.maxConnections` | `Optional` | Maximum number of parallel connections to use for uploading backup data. By default, Stash will use maximum 5 parallel connections. | + +Below, the YAML of a sample `Repository` crd that uses a B2 bucket as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: b2-repo + namespace: demo +spec: + backend: + b2: + bucket: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: b2-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/b2.yaml +repository/b2-repo created +``` + +Now, we are ready to use this backend to backup our desired data using Stash. + +## Next Steps + +- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). +- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). +- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). diff --git a/docs/guides/latest/backends/gcs.md b/docs/guides/latest/backends/gcs.md new file mode 100644 index 000000000..660f81af3 --- /dev/null +++ b/docs/guides/latest/backends/gcs.md @@ -0,0 +1,85 @@ +--- +title: GCS Backend | Stash +description: Configure Stash to use Google Cloud Storage (GCS) as Backend. +menu: + product_stash_0.8.3: + identifier: backend-gcs + name: Google Cloud Storage + parent: backend + weight: 50 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +# Google Cloud Storage (GCS) + +Stash supports [Google Cloud Storage(GCS)](https://cloud.google.com/storage/) as a backend. This tutorial will show you how to use this backend. + +In order to use Google Cloud Storage as backend, you have to create a `Secret` and a `Repository` object pointing to the desired GCS bucket. + +#### Create Storage Secret + +To configure storage secret for this backend, following secret keys are needed: + +| Key | Type | Description | +| --------------------------------- | ---------- | ----------------------------------------------------------- | +| `RESTIC_PASSWORD` | `Required` | Password that will be used to encrypt the backup snapshots. | +| `GOOGLE_PROJECT_ID` | `Required` | Google Cloud project ID. | +| `GOOGLE_SERVICE_ACCOUNT_JSON_KEY` | `Required` | Google Cloud service account json key. | + +Create storage secret as below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ echo -n '' > GOOGLE_PROJECT_ID +$ mv downloaded-sa-json.key > GOOGLE_SERVICE_ACCOUNT_JSON_KEY +$ kubectl create secret generic -n demo gcs-secret \ + --from-file=./RESTIC_PASSWORD \ + --from-file=./GOOGLE_PROJECT_ID \ + --from-file=./GOOGLE_SERVICE_ACCOUNT_JSON_KEY +secret/gcs-secret created +``` + +### Create Repository + +Now, you have to create a `Repository` crd. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. + +Following parameters are available for `gcs` backend. + +| Parameter | Type | Description | +| -------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `gcs.bucket` | `Required` | Name of Bucket. If the bucket does not exist yet, it will be created in the default location (US). It is not possible at the moment for Stash to create a new bucket in a different location, so you need to create it using Google cloud console. | +| `gcs.prefix` | `Optional` | Path prefix inside the bucket where backed up data will be stored. | +| `gcs.maxConnections` | `Optional` | Maximum number of parallel connections to use for uploading backup data. By default, Stash will use maximum 5 parallel connections. | + +Below, the YAML of a sample `Repository` crd that uses a GCS bucket as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: gcs-repo + namespace: demo +spec: + backend: + gcs: + bucket: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: gcs-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/gcs.yaml +repository/gcs-repo created +``` + +Now, we are ready to use this backend to backup our desired data using Stash. + +## Next Steps + +- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). +- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). +- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). diff --git a/docs/guides/latest/backends/local.md b/docs/guides/latest/backends/local.md new file mode 100644 index 000000000..cc9726bca --- /dev/null +++ b/docs/guides/latest/backends/local.md @@ -0,0 +1,275 @@ +--- +title: Local Backend | Stash +description: Configure Stash to Use Local Backend. +menu: + product_stash_0.8.3: + identifier: backend-local + name: Kubernetes Volumes + parent: backend + weight: 20 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +# Local Backend + +`Local` backend refers to a local path inside `stash` sidecar container. Any Kubernetes supported [persistent volume](https://kubernetes.io/docs/concepts/storage/volumes/) such as [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim), [HostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath), [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) (for testing only), [NFS](https://kubernetes.io/docs/concepts/storage/volumes/#nfs), [gcePersistentDisk](https://kubernetes.io/docs/concepts/storage/volumes/#gcepersistentdisk) etc. can be used as local backend. + +In order to use Kubernetes volumes as backend, you have to create a `Secret` and a `Repository` object pointing to the desired volume. + +### Create Storage Secret + +To configure storage secret for local backend, following secret keys are needed: + +| Key | Type | Description | +| ----------------- | ---------- | ---------------------------------------------------------- | +| `RESTIC_PASSWORD` | `Required` | Password that will be used to encrypt the backup snapshots | + +Create storage secret as below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ kubectl create secret generic -n demo local-secret --from-file=./RESTIC_PASSWORD +secret/local-secret created +``` + +### Create Repository + +Now, you have to create a `Repository` crd that uses Kubernetes volume as a backend. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. + +Following parameters are available for `Local` backend. + +| Parameter | Type | Description | +| -------------------- | ---------- | ------------------------------------------------------------------------------------------------------ | +| `local.mountPath` | `Required` | Path where this volume will be mounted inside the sidecar container. Example: `/safe/data`. | +| `local.subPath` | `Optional` | Sub-path inside the referenced volume where the backed up snapshot will be stored instead of its root. | +| `local.VolumeSource` | `Required` | Any Kubernetes volume. Can be specified inlined. Example: `hostPath`. | + +Here, we are going to show some sample `Repository` crds that uses different Kubernetes volume as a backend. + +##### HostPath volume as Backend + +Below, the YAML of a sample `Repository` crd that uses a `hostPath` volume as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-hostpath + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + hostPath: + path: /data/stash-test/repo + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/local_hostPath.yaml +repository/local-repo-with-hostpath created +``` + +>Note that by default, Stash runs as `non-root` user. `hostPath` volume is writable only for `root` user. So, in order to use `hostPath` volume as backend, either you have to run Stash as `root` user using securityContext or you have to change the permission of the `hostPath` to make it writable for `non-root` users. + +##### PersistentVolumeClaim as Backend + +Below, the YAML of a sample `Repository` crd that uses a `PersistentVolumeClaim` as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-pvc + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + persistentVolumeClaim: + claimName: repo-pvc + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/local_pvc.yaml +repository/local-repo-with-pvc created +``` + +##### NFS volume as Backend + +Below, the YAML of a sample `Repository` crd that uses an `NFS` volume as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-nfs + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + nfs: + server: "nfs-service.storage.svc.cluster.local" # use you own NFS server address + path: "/" # this path is relative to "/exports" path of NFS server + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/local_nfs.yaml +repository/local-repo-with-nfs created +``` + +##### GCE PersitentDisk as Backend + +Below, the YAML of a sample `Repository` crd that uses a [gcePersistentDisk](https://kubernetes.io/docs/concepts/storage/volumes/#gcepersistentdisk) as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-gcepersistentdisk + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + gcePersistentDisk: + pdName: stash-repo + fsType: ext4 + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/local_gcePersistentDisk.yaml +repository/local-repo-with-gcepersistentdisk created +``` + +>In order to use `gcePersistentDisk` volume as backend, the node where stash container is running must be a GCE VM and the VM must be in same GCE project and zone as the Persistent Disk. + +##### AWS EBS volume as Backend + +Below, the YAML of a sample `Repository` crd that uses an [awsElasticBlockStore](https://kubernetes.io/docs/concepts/storage/volumes/#awselasticblockstore) as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-awsebs + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + awsElasticBlockStore: # This AWS EBS volume must already exist. + volumeID: + fsType: ext4 + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/local_awsElasticBlockStore.yaml +repository/local-repo-with-awsebs created +``` + +>In order to use `awsElasticBlockStore` volume as backend, the pod where stash container is running must be running on an AWS EC2 instance and the instance must be in the same region and availability-zone as the EBS volume. + +##### Azure Disk as Backend + +Below, the YAML of a sample `Repository` crd that uses an [azureDisk](https://kubernetes.io/docs/concepts/storage/volumes/#azuredisk) as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-azuredisk + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + azureDisk: + diskName: stash.vhd + diskURI: https://someaccount.blob.microsoft.net/vhds/stash.vhd + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/local_azureDisk.yaml +repository/local-repo-with-azuredisk created +``` + +##### StorageOS as Backend + +Below, the YAML of a sample `Repository` crd that uses a [storageOS](https://kubernetes.io/docs/concepts/storage/volumes/#storageos) volume as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-storageos + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + storageos: + volumeName: stash-vol01 # The `stash-vol01` volume must already exist within StorageOS in the `demo` namespace. + fsType: ext4 + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/local_storageOS.yaml +repository/local-repo-with-storageos created +``` + +##### EmptyDir volume as Backend + +Below, the YAML of a sample `Repository` crd that uses an [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: local-repo-with-emptydir + namespace: demo +spec: + backend: + local: + mountPath: /safe/data + emptyDir: {} + storageSecretName: local-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/emptyDir.yaml +repository/local-repo-with-emptydir created +``` + +>**Warning:** Data of an `emptyDir` volume is not persistent. If you delete the pod that runs the respective stash container, you will lose all the backed up data. You should use this kind of volumes only to test backup process. + +## Next Steps + +- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). +- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). +- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). diff --git a/docs/guides/latest/backends/overview.md b/docs/guides/latest/backends/overview.md new file mode 100644 index 000000000..e36453bb8 --- /dev/null +++ b/docs/guides/latest/backends/overview.md @@ -0,0 +1,51 @@ +--- +title: Backend Overview | Stash +description: An overview of the backends used by Stash to store backed up data. +menu: + product_stash_0.8.3: + identifier: backend-overview + name: What is Backend? + parent: backend + weight: 10 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +> New to Stash? Please start [here](/docs/concepts/README.md). + +# Stash Backends + +Stash supports various backends for storing data snapshots. It can be a cloud storage like GCS bucket, AWS S3, Azure Blob Storage etc. or a Kubernetes persistent volume like [HostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath), [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim), [NFS](https://kubernetes.io/docs/concepts/storage/volumes/#nfs) etc. + +The following diagram shows how Stash sidecar container accesses and backs up data into a backend. + +
+  Stash Backend Overview +
Fig: Stash Backend Overview
+
+ +You have to create a [Repository](/docs/concepts/crds/repository.md) object which contains backend information and a `Secret` which contains necessary credentials to access the backend. + +Stash sidecar/backup job reads backend information from the `Repository` and retrieves access credentials from the `Secret`. Then on the first backup session, Stash will initialize a repository in the backend. + +Below, a screenshot that shows a repository created in AWS S3 bucket named `stash-qa`: + +
+  Repository in AWS S3 Backend +
Fig: Repository in AWS S3 Backend
+
+ +You will see all snapshots taken by Stash at `/snapshot` directory of this repository. + +> Note: Stash stores data encrypted at rest. So, snapshot files in the bucket will not contain any meaningful data until they are decrypted. + +## Next Steps + +- Learn how to configure `Kuberntes Volume` as backend from [here](/docs/guides/v1beta1/backends/local.md). +- Learn how to configure `AWS S3/Minio/Rook` backend from [here](/docs/guides/v1beta1/backends/s3.md). +- Learn how to configure `Google Cloud Storage (GCS)` backend from [here](/docs/guides/v1beta1/backends/gcs.md). +- Learn how to configure `Microsoft Azure Storage` backend from [here](/docs/guides/v1beta1/backends/azure.md). +- Learn how to configure `OpenStack Swift` backend from [here](/docs/guides/v1beta1/backends/swift.md). +- Learn how to configure `Backblaze B2` backend from [here](/docs/guides/v1beta1/backends/b2.md). +- Learn how to configure `REST` backend from [here](/docs/guides/v1beta1/backends/rest.md). diff --git a/docs/guides/latest/backends/rest.md b/docs/guides/latest/backends/rest.md new file mode 100644 index 000000000..b444f3de6 --- /dev/null +++ b/docs/guides/latest/backends/rest.md @@ -0,0 +1,83 @@ +--- +title: REST Backend | Stash +description: Configure Stash to REST Server as Backend. +menu: + product_stash_0.8.3: + identifier: backend-rest + name: REST Server + parent: backend + weight: 80 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +# REST Backend + +Stash supports restic's [REST Server](https://github.com/restic/rest-server) as a backend. This tutorial will show you how to use this backend. + +In order to use REST Server as backend, you have to create a `Secret` and a `Repository` object pointing to the desired REST Server address. + +#### Create Storage Secret + +To configure storage secret for this backend, following secret keys are needed: + +| Key | Type | Description | +| ---------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RESTIC_PASSWORD` | `Required` | Password that will be used to encrypt the backup snapshots. | +| `REST_SERVER_USERNAME` | `Optional` | Username for basic authentication in the REST server. | +| `REST_SERVER_PASSWORD` | `Optional` | Password for basic authentication in the REST Server | +| `CA_CERT_DATA` | `optional` | CA certificate used by storage backend. This can be used to pass the root certificate that has been used to sign the server certificate of a TLS secured REST Server. | + +Create storage secret as below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ echo -n '' > REST_SERVER_USERNAME +$ echo -n '' > REST_SERVER_PASSWORD +$ kubectl create secret generic -n demo rest-secret \ + --from-file=./RESTIC_PASSWORD \ + --from-file=./REST_SERVER_USERNAME \ + --from-file=./REST_SERVER_PASSWORD +secret/rest-secret created +``` + +### Create Repository + +Now, you have to create a `Repository` crd. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. + +Following parameters are available for `rest` backend, + +| Parameter | Type | Description | +| ---------- | ---------- | ------------------------------------------------------------------------------------------------------------- | +| `rest.url` | `Required` | URL of the REST Server along with an optional path inside the server where backed up snapshot will be stored. | + +Below, the YAML of a sample `Repository` crd that uses a REST Server as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: rest-repo + namespace: demo +spec: + backend: + rest: + url: http://rest-server.demo.svc:8000/stash-backup-demo + storageSecretName: rest-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/rest.yaml +repository/rest-repo created +``` + +Now, we are ready to use this backend to backup our desired data using Stash. + +## Next Steps + +- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). +- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). +- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). diff --git a/docs/guides/latest/backends/s3.md b/docs/guides/latest/backends/s3.md new file mode 100644 index 000000000..de56e7329 --- /dev/null +++ b/docs/guides/latest/backends/s3.md @@ -0,0 +1,102 @@ +--- +title: AWS S3/Minio/Rook Backend | Stash +description: Configure Stash to use AWS S3/Minio/Rook as Backend. +menu: + product_stash_0.8.3: + identifier: backend-s3 + name: AWS S3/Minio/Rook + parent: backend + weight: 30 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +# AWS S3 + +Stash supports AWS S3 or S3 compatible storage services like [Minio](https://minio.io/) servers, [Rook Object Store](https://rook.io/docs/rook/v0.9/ceph-object.html), [DigitalOceans Space](https://www.digitalocean.com/products/spaces/) as a backend. This tutorial will show you how to use this backend. + +In order to use S3 or S3 compatible storage service as backend, you have to create a `Secret` and a `Repository` object pointing to the desired bucket. + +#### Create Storage Secret + +To configure storage secret for this backend, following secret keys are needed: + +| Key | Type | Description | +| ----------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `RESTIC_PASSWORD` | `Required` | Password that will be used to encrypt the backup snapshots. | +| `AWS_ACCESS_KEY_ID` | `Required` | AWS / Minio / Rook / DigitalOcean Spaces access key ID | +| `AWS_SECRET_ACCESS_KEY` | `Required` | AWS / Minio / Rook / DigitalOcean Spaces secret access key | +| `CA_CERT_DATA` | `optional` | CA certificate used by storage backend. This can be used to pass the root certificate that has been used to sign the server certificate of a TLS secured Minio server. | + +Create storage secret as below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ echo -n '' > AWS_ACCESS_KEY_ID +$ echo -n '' > AWS_SECRET_ACCESS_KEY +$ kubectl create secret generic -n demo s3-secret \ + --from-file=./RESTIC_PASSWORD \ + --from-file=./AWS_ACCESS_KEY_ID \ + --from-file=./AWS_SECRET_ACCESS_KEY +secret/s3-secret created +``` + +For TLS secured Minio Server, create secret as below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ echo -n '' > AWS_ACCESS_KEY_ID +$ echo -n '' > AWS_SECRET_ACCESS_KEY +$ cat ./directory/of/root/certificate/ca.crt > CA_CERT_DATA +$ kubectl create secret generic -n demo minio-secret \ + --from-file=./RESTIC_PASSWORD \ + --from-file=./AWS_ACCESS_KEY_ID \ + --from-file=./AWS_SECRET_ACCESS_KEY \ + --from-file=./CA_CERT_DATA +secret/minio-secret created +``` + +### Create Repository + +Now, you have to create a `Repository` crd. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. + +Following parameters are available for `S3` backend. + +| Parameter | Type | Description | +| ------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `s3.endpoint` | `Required` | For S3, use `s3.amazonaws.com`. If your bucket is in a different location, S3 server (s3.amazonaws.com) will redirect Stash to the correct endpoint. For DigitalOCean, use `nyc3.digitaloceanspaces.com` etc. depending on your bucket region. For S3-compatible other storage services like Minio / Rook use URL of the server. | +| `s3.bucket` | `Required` | Name of Bucket. If the bucket does not exist yet it will be created in the default location (`us-east-1` for S3). It is not possible at the moment for Stash to create a new bucket in a different location, so you need to create it using a different program. | +| `s3.prefix` | `Optional` | Path prefix inside the bucket where the backed up data will be stored. | + +Below, the YAML of a sample `Repository` crd that uses an `S3` bucket as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: s3-repo + namespace: demo +spec: + backend: + s3: + endpoint: s3.amazonaws.com # use server URL for s3 compatible other storage service + bucket: stash-demo + prefix: /backup/demo/deployment/stash-demo + storageSecretName: s3-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/s3.yaml +repository/s3-repo created +``` + +Now, we are ready to use this backend to backup our desired data using Stash. + +## Next Steps + +- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). +- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). +- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). diff --git a/docs/guides/latest/backends/swift.md b/docs/guides/latest/backends/swift.md new file mode 100644 index 000000000..a0d554ed6 --- /dev/null +++ b/docs/guides/latest/backends/swift.md @@ -0,0 +1,158 @@ +--- +title: Swift Backend | Stash +description: Configure Stash to use OpenStack Swift as Backend. +menu: + product_stash_0.8.3: + identifier: backend-swift + name: OpenStack Swift + parent: backend + weight: 60 +product_name: stash +menu_name: product_stash_0.8.3 +section_menu_id: guides +--- + +# OpenStack Swift + +Stash supports [OpenStack Swift](https://www.swiftstack.com/product/open-source/openstack-swift) as a backend. This tutorial will show you how to use this backend. + +In order to use OpenStack Swift as backend, you have to create a `Secret` and a `Repository` object pointing to the desired Swift container. + +#### Create Storage Secret + +Stash supports Swift's Keystone v1, v2, v3 authentication as well as token-based authentication. + +**Keystone v1 authentication:** + +For keystone v1 authentication, following secret keys are needed: + +| Key | Description | +|--------------------------|------------------------------------------------------------| +| `RESTIC_PASSWORD` | Password used that will be used to encrypt the backup snapshots.| +| `ST_AUTH` | URL of the Keystone server. | +| `ST_USER` | Username. | +| `ST_KEY` | Password. | + +**Keystone v2 authentication:** + +For keystone v2 authentication, following secret keys are needed: + +| Key | Description | +|--------------------------|------------------------------------------------------------| +| `RESTIC_PASSWORD` | Password used that will be used to encrypt the backup snapshots.| +| `OS_AUTH_URL` | URL of the Keystone server. | +| `OS_REGION_NAME` | Storage region name | +| `OS_USERNAME` | Username | +| `OS_PASSWORD` | Password | +| `OS_TENANT_ID` | Tenant ID | +| `OS_TENANT_NAME` | Tenant Name | + +**Keystone v3 authentication:** + +For keystone v3 authentication, following secret keys are needed: + +| Key | Description | +|--------------------------|------------------------------------------------------------| +| `RESTIC_PASSWORD` | Password used that will be used to encrypt the backup snapshots.| +| `OS_AUTH_URL` | URL of the Keystone server. | +| `OS_REGION_NAME` | Storage region name | +| `OS_USERNAME` | Username | +| `OS_PASSWORD` | Password | +| `OS_USER_DOMAIN_NAME` | User domain name | +| `OS_PROJECT_NAME` | Project name | +| `OS_PROJECT_DOMAIN_NAME` | Project domain name | + +For keystone v3 application credential authentication (application credential id): + +| Key | Description | +|--------------------------|------------------------------------------------------------| +| `RESTIC_PASSWORD` | Password used that will be used to encrypt the backup snapshots.| +| `OS_AUTH_URL` | URL of the Keystone server. | +| `OS_APPLICATION_CREDENTIAL_ID` | The ID of the application credential used for authentication. If not provided, the application credential must be identified by its name and its owning user.| +| `OS_APPLICATION_CREDENTIAL_SECRET` | The secret for authenticating the application credential. +| + +For keystone v3 application credential authentication (application credential name): +| Key | Description | +|--------------------------|------------------------------------------------------------| +| `RESTIC_PASSWORD` | Password used that will be used to encrypt the backup snapshots.| +| `OS_AUTH_URL` | URL of the Keystone server. | +| `OS_USERNAME` | User name| +| `OS_USER_DOMAIN_NAME` | User domain name| +| `OS_APPLICATION_CREDENTIAL_NAME` | The name of the application credential used for authentication. If provided, must be accompanied by a user object. +| +| `OS_APPLICATION_CREDENTIAL_SECRET` | The secret for authenticating the application credential. +| + +**Token-based authentication:** + +For token-based authentication, following secret keys are needed: + +| Key | Description | +|--------------------------|------------------------------------------------------------| +| `RESTIC_PASSWORD` | Password used that will be used to encrypt the backup snapshots.| +| `OS_STORAGE_URL` | Storage URL | +| `OS_AUTH_TOKEN` | Authentication token | + +A sample storage secret creation for keystone v2 authentication is shown below, + +```console +$ echo -n 'changeit' > RESTIC_PASSWORD +$ echo -n '' > OS_AUTH_URL +$ echo -n '' > OS_TENANT_ID +$ echo -n '' > OS_TENANT_NAME +$ echo -n '' > OS_USERNAME +$ echo -n '' > OS_PASSWORD +$ echo -n '' > OS_REGION_NAME +$ kubectl create secret generic swift-secret \ + --from-file=./RESTIC_PASSWORD \ + --from-file=./OS_AUTH_URL \ + --from-file=./OS_TENANT_ID \ + --from-file=./OS_TENANT_NAME \ + --from-file=./OS_USERNAME \ + --from-file=./OS_PASSWORD \ + --from-file=./OS_REGION_NAME +secret/swift-secret created +``` + +### Create Repository + +Now, you have to create a `Repository` crd. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. + +Following parameters are available for `Swift` backend. + +| Parameter | Description | +| ----------------- | ------------------------------------------------------------------------------ | +| `swift.container` | `Required`. Name of Storage container | +| `swift.prefix` | `Optional`. Path prefix inside the container where backed up data will be stored. | + +Below, the YAML of a sample `Repository` crd that uses a Swift container as a backend. + +```yaml +apiVersion: stash.appscode.com/v1alpha1 +kind: Repository +metadata: + name: swift-repo + namespace: demo +spec: + backend: + swift: + container: stash-backup + prefix: /demo/deployment/my-deploy + storageSecretName: swift-secret +``` + +Create the `Repository` we have shown above using the following command, + +```console +$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/swift.yaml +repository/swift-repo created +``` + +Now, we are ready to use this backend to backup our desired data using Stash. + +## Next Steps + +- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). +- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). +- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). diff --git a/docs/guides/v1alpha1/backends/azure.md b/docs/guides/v1alpha1/backends/azure.md index 15c5d0e6b..704a488a8 100644 --- a/docs/guides/v1alpha1/backends/azure.md +++ b/docs/guides/v1alpha1/backends/azure.md @@ -3,7 +3,7 @@ title: Azure Backend | Stash description: Configure Stash to use Microsoft Azure Storage as Backend. menu: product_stash_0.8.3: - identifier: backend-azure + identifier: v1alpha1-backend-azure name: Azure Blob Storage parent: v1alpha1-backend weight: 40 diff --git a/docs/guides/v1alpha1/backends/b2.md b/docs/guides/v1alpha1/backends/b2.md index aacf3195b..ee2dce0a4 100644 --- a/docs/guides/v1alpha1/backends/b2.md +++ b/docs/guides/v1alpha1/backends/b2.md @@ -3,7 +3,7 @@ title: Backblaze B2 Backend | Stash description: Configure Stash to use Backblaze B2 as Backend. menu: product_stash_0.8.3: - identifier: backend-b2 + identifier: v1alpha1-backend-b2 name: Backblaze B2 parent: v1alpha1-backend weight: 70 diff --git a/docs/guides/v1alpha1/backends/gcs.md b/docs/guides/v1alpha1/backends/gcs.md index fd902bb15..41d76c8be 100644 --- a/docs/guides/v1alpha1/backends/gcs.md +++ b/docs/guides/v1alpha1/backends/gcs.md @@ -3,7 +3,7 @@ title: GCS Backend | Stash description: Configure Stash to use Google Cloud Storage (GCS) as Backend. menu: product_stash_0.8.3: - identifier: backend-gcs + identifier: v1alpha1-backend-gcs name: Google Cloud Storage parent: v1alpha1-backend weight: 50 diff --git a/docs/guides/v1alpha1/backends/local.md b/docs/guides/v1alpha1/backends/local.md index d50531dcd..c7b920664 100644 --- a/docs/guides/v1alpha1/backends/local.md +++ b/docs/guides/v1alpha1/backends/local.md @@ -3,7 +3,7 @@ title: Local Backend | Stash description: Configure Stash to Use Local Backend. menu: product_stash_0.8.3: - identifier: backend-local + identifier: v1alpha1-backend-local name: Persistent Volumes parent: v1alpha1-backend weight: 20 diff --git a/docs/guides/v1alpha1/backends/overview.md b/docs/guides/v1alpha1/backends/overview.md index 641fde700..663351b69 100644 --- a/docs/guides/v1alpha1/backends/overview.md +++ b/docs/guides/v1alpha1/backends/overview.md @@ -1,9 +1,10 @@ + --- title: Backend Overview | Stash description: An overview of backends used by Stash to store snapshot data. menu: product_stash_0.8.3: - identifier: backend-overview + identifier: v1alpha1-backend-overview name: What is Backend? parent: v1alpha1-backend weight: 10 @@ -19,7 +20,7 @@ section_menu_id: guides Backend is where Stash stores backup snapshots. It can be a cloud storage like GCS bucket, AWS S3, Azure Blob Storage etc. or a Kubernetes persistent volume like [HostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath), [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim), [NFS](https://kubernetes.io/docs/concepts/storage/volumes/#nfs) etc. Below diagram show how Stash sidecar container access and store backup data into a backend storage.

-  Stash Backup Overview +  Stash Backup Overview

Stash sidecar container receive backend information from `spec.backend` field of [Restic](/docs/concepts/crds/restic.md) crd. It obtains necessary credentials to access the backend from the secret specified in `spec.backend.storageSecretName` field of Restic crd. Then on first backup schedule, Stash initialize a repository in the backend. @@ -27,7 +28,7 @@ Stash sidecar container receive backend information from `spec.backend` field of Below, a screenshot that show a repository created at AWS S3 bucket named `stash-qa` for a Deployment named `stash-demo`.

-  Repository in AWS S3 Backend +  Repository in AWS S3 Backend

You will see all snapshots taken by Stash at `/snapshot` directory of this repository. diff --git a/docs/guides/v1alpha1/backends/s3.md b/docs/guides/v1alpha1/backends/s3.md index f05381966..f8691a8a8 100644 --- a/docs/guides/v1alpha1/backends/s3.md +++ b/docs/guides/v1alpha1/backends/s3.md @@ -3,7 +3,7 @@ title: AWS S3 Backend | Stash description: Configure Stash to use AWS S3 as Backend. menu: product_stash_0.8.3: - identifier: backend-s3 + identifier: v1alpha1-backend-s3 name: AWS S3 parent: v1alpha1-backend weight: 30 diff --git a/docs/guides/v1alpha1/backends/swift.md b/docs/guides/v1alpha1/backends/swift.md index c69f4e6f4..da45ab811 100644 --- a/docs/guides/v1alpha1/backends/swift.md +++ b/docs/guides/v1alpha1/backends/swift.md @@ -3,7 +3,7 @@ title: Swift Backend | Stash description: Configure Stash to use OpenStack Swift as Backend. menu: product_stash_0.8.3: - identifier: backend-swift + identifier: v1alpha1-backend-swift name: OpenStack Swift parent: v1alpha1-backend weight: 60 diff --git a/docs/images/v1beta1/backends/backend_overview.svg b/docs/images/v1beta1/backends/backend_overview.svg new file mode 100644 index 000000000..7106b39b3 --- /dev/null +++ b/docs/images/v1beta1/backends/backend_overview.svg @@ -0,0 +1,527 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/images/v1beta1/backends/s3_repository.png b/docs/images/v1beta1/backends/s3_repository.png new file mode 100644 index 000000000..47cdab9c9 Binary files /dev/null and b/docs/images/v1beta1/backends/s3_repository.png differ