---
title: Charmhub | Deploy Velero Operator Charm using Charmhub - The Open Operator
  Collection
description: Deploy the latest version of Velero Operator Charm on any cloud.
url: https://charmhub.io/velero-operator/docs/backup-config-interface
---

# Velero Operator Charm

[Kubeflow Charmers](https://charmhub.io/publisher/ckfbot "View all packages from Kubeflow Charmers")

* [Kubeflow Charmers](https://charmhub.io/publisher/ckfbot "View all packages from Kubeflow Charmers")

Platform:

24.04

edge 503

```
juju deploy velero-operator --channel edge
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://github.com/canonical/velero-operator)

---

#### Contacts

* [Submit a bug](https://github.com/canonical/velero-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# Backup config interface

The backup config interface enables a client charm to declare what Kubernetes data must be backed up. It delegates the execution to Charmed Velero (no elevated cluster perms on the client). Charmed Velero consumes the spec and creates the corresponding Velero Backup Custom Resource (CR).

Charmed Velero supports **multiple concurrent** relations from many clients and endpoints, disambiguating by client app, relation name and model.

## [Data contract](https://charmhub.io/velero-operator/docs/backup-config-interface#p-39715-data-contract)

Charmed Velero expects a `spec` object in the databag from a provider charm. You can find below an overview of the fields in the object, their type and extracted data:

**`spec` fields** (all optional unless stated):

* `include_namespaces`: `list[str]` — Only these namespaces are backed up.
* `include_resources`: `list[str]` — Only these resource kinds are included.
* `exclude_namespaces`: `list[str]` — Namespaces to omit.
* `exclude_resources`: `list[str]` — Resource kinds to omit.
* `include_cluster_resources`: `bool` — Include cluster-scoped resources; default `false`.
* `label_selector`: `dict` — Key/value selector to filter objects (e.g., `{"app": "kubeflow"}`).
* `ttl`: `str` — Retention, e.g., `"72h"`, `"30d"` (Velero duration format). If unset, Velero’s default applies.

## [Lifecycle and behaviour](https://charmhub.io/velero-operator/docs/backup-config-interface#p-39715-lifecycle-and-behaviour)

* **Client** sets/updates relation data with its backup spec as soon as the relation is joined/changed.
* **Operator** watches relation events; when a backup is triggered (e.g., via action), it renders a **Backup** CR from the latest spec and submits it to the cluster.

## [Examples](https://charmhub.io/velero-operator/docs/backup-config-interface#p-39715-examples)

This is the minimal databag example between the provider charm (client) and the requirer charm (Charmed Velero):

```
application-data:
  app: kubeflow
  relation_name: profiles-backup
  model: kubeflow-model
  spec:
    include_namespaces: ["kubeflow"]
    include_resources: ["profiles.kubeflow.org"]
    exclude_resources: null
    exclude_namespaces: null
    label_selector: {"app": "kubeflow"}
    include_cluster_resources: false
    ttl: null
```

Here are some implementation examples of a client charm using the interface and the library provided by Charmed Velero:

* [MinIO Operator](https://github.com/canonical/minio-operator/blob/4b7713bd6fbc0b60a473210cd58135be1d9a472f/src/charm.py#L117-L127)
* [Kubeflow-Profiles Operator](https://github.com/canonical/kubeflow-profiles-operator/blob/b8ffecf74b3e99ea72a6caddb487869ef2b0ddff/src/charm.py#L103-L119)

For more details, please see [the interface specification](https://github.com/canonical/charm-relation-interfaces/blob/main/interfaces/velero_backup_config/v0/README.md) and [the charm library](https://github.com/canonical/velero-operator/blob/main/lib/charms/velero_libs/v0/velero_backup_config.py).

---
