Repositories

StorageRepository

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 storagerepositories.repositories.kio.kasten.io --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/repositories.kio.kasten.io/v1alpha1/namespaces/kasten-io/storagerepositories/kopia-metadata-repository-2bgqbcf724/details | yq -y .status.details
kopiaMeta:
  ...

StorageRepository API Type

The following is a complete specification of the StorageRepository resource.

# Standard Kubernetes API Version declaration. Required.
apiVersion: repositories.kio.kasten.io/v1alpha1
# Standard Kubernetes Kind declaration. Required.
kind: StorageRepository
# Standard Kubernetes metadata. Required.
metadata:
  # Name of the StorageRepository. Required.
  name: kopia-metadata-repository-2bgqbcf724
  # Namespace of the StorageRepository. Required.
  namespace: kasten-io
# Status of the StorageRepository.
status:
  # Content type of the data stored in this repository.
  contentType: metadata
  # Backend type of this repository.
  backendType: kopia
  # Details
  details:
    kopiaMeta:
      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.
  location:
  # The name of the application associated with the data in this repository.j
  appName: kasten-io