You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here.
Stash supports restic’s 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.
To configure storage secret for this backend, following secret keys are needed:
|Password that will be used to encrypt the backup snapshots.
|Username for basic authentication in the REST server.
|Password for basic authentication in the REST Server
|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,
$ echo -n 'changeit' > RESTIC_PASSWORD
$ echo -n '<your-rest-server-username>' > REST_SERVER_USERNAME
$ echo -n '<your-rest-server-password>' > REST_SERVER_PASSWORD
$ kubectl create secret generic -n demo rest-secret \
Now, you have to create a
Repository crd. You have to provide the storage secret that we have created earlier in
Following parameters are available for
|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.
Repository we have shown above using the following command,
$ kubectl apply -f https://github.com/stashed/docs/raw/v2021.11.24/docs/examples/guides/latest/backends/rest.yaml
Now, we are ready to use this backend to backup our desired data using Stash.