A StorageRepository API resource is used to represent how K10 backup data is stored at a particular location (represented by a Profile<api_profile>). K10 will distribute backup data generated by a Policy<api_policy> run into one or more repositories, based on data type and deduplication domain.

The API gives the user an insight into the status of these repositories, and provides a means of performing maintenance and management actions on them.

List StorageRepositories Example

The following example illustrates listing all StorageRepositories created by a policy backing up two applications, each with PVCs.

# list storage repositories
$ kubectl get --namespace kasten-io
NAME                                     LOCATIONTYPE
kopia-volumedata-repository-zcfk68hdht   ObjectStore
kopia-volumedata-repository-hkpjmr2w6d   ObjectStore
kopia-metadata-repository-2bgqbcf724     ObjectStore

Get StorageRepositories Details Example

In addition to getting a StorageRepository, you can also query the details associated with the restore point. You would use the details sub-resource for that purpose.

# get the details for storagerepository 'kopia-metadata-repository-2bgqbcf724' in the 'kasten-io' namespace.
# yq only used for readability
$ kubectl get --raw /apis/ | yq -y .status.details

StorageRepository API Type

The following is a complete specification of the StorageRepository resource.

# Standard Kubernetes API Version declaration. Required.
# Standard Kubernetes Kind declaration. Required.
kind: StorageRepository
# Standard Kubernetes metadata. Required.
  # Name of the StorageRepository. Required.
  name: kopia-metadata-repository-2bgqbcf724
  # Namespace of the StorageRepository. Required.
  namespace: kasten-io
# Status of the StorageRepository.
  # Content type of the data stored in this repository.
  contentType: metadata
  # Backend type of this repository.
  backendType: kopia
  # Details
      formatVersion: 2
  # Location specifying where the data associated with this repository
  # can be found. This will match the format of the location spec
  # in a policy.
  # The name of the application associated with the data in this repository.j
  appName: kasten-io