You are looking at the documentation of a prior release. To read the documentation of the latest release, please visit here.
Warning: Recovery crd has been deprecated in v1beta1 api and will be removed in future version. Please use RestoreSession instead.
Recovery is a Kubernetes
CustomResourceDefinition (CRD). It provides configuration for restoring a backup taken using Stash. You only need to specify the
path you want to recover and volume where the backup will be restored.
As with all other Kubernetes objects, a Recovery needs
metadata fields. It also needs a
.spec section. Below is an example Recovery object.
apiVersion: stash.appscode.com/v1alpha1 kind: Recovery metadata: name: stash-demo namespace: default spec: repository: name: deployment.stash-demo namespace: default snapshot: deployment.stash-demo-e0e9c272 # skip this field to recover latest snapshot paths: - /source/data recoveredVolumes: - mountPath: /source/data hostPath: path: /data/stash-test/restic-restored
.spec section has following parts:
Indicates the name of the
Repository CRD that represents respective restic repository where the backed up snapshots are stored. To know more about
Repository CRD, visit here.
Repository CRD. This field allow the users to recover backed up volume from a different namespace.
Indicates the name of the
Snapshot object that represents restic backup snapshot. This field allows users to recover specific snapshot. To recover the latest snapshot, skip this field. To know more about
Snapshots, visit here.
An array of strings specifying the file-group paths that were backed up using
Indicates an array of volumes where recovered snapshot data will be stored. Here,
mountPath specifies where the volume will be mounted in the restore
Job. Note that,
Recovery recovers data in the same paths from where the backup was taken (specified in
spec.paths). So, volumes must be mounted on those paths or their parent paths. Following parameters are available for
Stash operator updates
.status of a Recovery CRD when the recovery operation is completed.
status.phaseindicates the current phase of the overall recovery process. Possible values are
status.statsis an array status, each of which indicates the status for individual paths. Each element of the array has following fields:
status.stats.pathindicates a path that was backed up using
Resticand is selected for recovery.
status.stats.phaseindicates the current phase of the recovery process for the particular path. Possible values are
status.stats.durationindicates the elapsed time to successfully restore backup for the particular path.