---
title: Charmhub | Deploy Infra Backup Operator using Charmhub - The Open Operator
  Collection
description: Deploy the latest version of Infra Backup Operator on any cloud.
url: https://charmhub.io/infra-backup-operator/docs/tutorial
---

# Infra Backup Operator

[Canonical Kubernetes](https://charmhub.io/publisher/containers "View all packages from Canonical Kubernetes")

* [Canonical Kubernetes](https://charmhub.io/publisher/containers "View all packages from Canonical Kubernetes")

Platform:

24.04

edge 11

```
juju deploy infra-backup-operator --channel edge
```

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

---

#### Relevant links

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

---

#### Contacts

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

---

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

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

# Tutorial

This guide provides a step-by-step tutorial on how to deploy the charm and create a backup/restore.

## [Requirements](https://charmhub.io/infra-backup-operator/docs/tutorial#p-38581-requirements)

The following tutorial requires a Kubernetes Juju controller, such as [Canonical K8s](https://documentation.ubuntu.com/juju/3.6/reference/cloud/list-of-supported-clouds/the-canonical-ks-cloud-and-juju/). A quick way of doing this is by using the [concierge](https://snapcraft.io/concierge) snap.

```
sudo snap install concierge --classic
sudo concierge prepare -v -p k8s
```

## [Deploy](https://charmhub.io/infra-backup-operator/docs/tutorial#p-38581-deploy)

```
juju add-model velero

# You can use the stable channel when available
juju deploy velero-operator --trust --config use-node-agent=true --channel=edge
juju deploy infra-backup-operator --channel=edge
juju deploy s3-integrator
```

## [Integrate](https://charmhub.io/infra-backup-operator/docs/tutorial#p-38581-integrate)

This tutorial uses the [s3-integrator](https://charmhub.io/s3-integrator) charm as the storage provider. Follow its documentation to set up the integrator with the AWS credentials.

If you want to test locally without creating a AWS s3 bucket, you can achieve this by using microceph and enabling rgw. Note that this is for testing proposes and **should not** be used for production sites:

```
# optional if you don't have a AWS s3 bucket
sudo snap install microceph
sudo microceph cluster bootstrap
sudo microceph disk add loop,1G,3
sudo microceph enable rgw --port 7480

sudo microceph.radosgw-admin user create --uid test --display-name test
# Save the access_key and secret_key

# Install the s3cmd
sudo apt install s3cmd

# Create a bucket
s3cmd --access_key=<ACCESS_KEY> \
--secret_key=<SECRET_KEY> \
--host=127.0.0.1:7480 \
--host-bucket="127.0.0.1:7480/%(bucket)" \
--no-ssl \
mb s3://my-bucket

# Set the S3-config
juju run s3-integrator/leader sync-s3-credentials access-key=<access_key> secret-key=<secret_key>

# <MICROCEPH_IP> from sudo microceph status
juju config s3-integrator bucket=my-bucket
juju config s3-integrator endpoint=http://<MICROCEPH_IP>:7480
juju config s3-integrator s3-uri-style=path
juju config s3-integrator region="my-region"
```

Once done, integrate it with Velero Operator:

```
juju integrate velero-operator s3-integrator
juju integrate infra-backup-operator:cluster-infra-backup velero-operator
juju integrate infra-backup-operator:namespaced-infra-backup velero-operator
```

After completing these steps you should be able to have a model like this:

```
Model                Controller     Cloud/Region  Version  SLA          Timestamp
velero              concierge-k8s  k8s           3.6.8    unsupported  16:36:14-03:00

App                    Version  Status  Scale  Charm                  Channel      Rev  Address         Exposed  Message
infra-backup-operator           active      1  infra-backup-operator                 0  10.152.183.162  no       Ready
s3-integrator                   active      1  s3-integrator          1/stable     145  10.152.183.28   no
velero-operator                 active      1  velero-operator        latest/edge  297  10.152.183.75   no       Unit is Ready

Unit                      Workload  Agent  Address     Ports  Message
infra-backup-operator/0*  active    idle   10.1.0.20          Ready
s3-integrator/0*          active    idle   10.1.0.153
velero-operator/0*        active    idle   10.1.0.247         Unit is Ready
```

## [Configure your K8s cluster](https://charmhub.io/infra-backup-operator/docs/tutorial#p-38581-configure-your-k8s-cluster)

Create some resources that are under the infra-backup-operator influence. E.g:

```
kubectl create role pod-reader --verb=get,list --resource=pods
kubectl create clusterrole pod-reader --verb=get,list --resource=pods
```

## [Create the Backup](https://charmhub.io/infra-backup-operator/docs/tutorial#p-38581-create-the-backup)

```
juju run velero-operator/0 create-backup target=infra-backup-operator:cluster-infra-backup

juju run velero-operator/0 create-backup target=infra-backup-operator:namespaced-infra-backup
```

## [Simulate a failure/outage](https://charmhub.io/infra-backup-operator/docs/tutorial#p-38581-simulate-a-failureoutage)

```
kubectl delete role pod-reader
kubectl delete clusterrole pod-reader
```

## [Restore](https://charmhub.io/infra-backup-operator/docs/tutorial#p-38581-restore)

```
# list the backups

juju run velero-operator/0 list-backups

backups:
  83503892-a24a-409b-b0df-553dcc2465ec:
    app: infra-backup-operator
    completion-timestamp: "2025-08-08T20:00:28Z"
    endpoint: cluster-infra-backup
    model: test-charm-9f0e8dda
    name: infra-backup-operator-cluster-infra-backup-pblz2
    phase: Completed
    start-timestamp: "2025-08-08T20:00:26Z"
  85662948-8e5e-4922-8e1c-c5568eafa6e7:
    app: infra-backup-operator
    completion-timestamp: "2025-08-07T18:42:13Z"
    endpoint: cluster-infra-backup
    model: test-charm-9f0e8dda
    name: infra-backup-operator-cluster-infra-backup-4bm7p
    phase: Completed
    start-timestamp: "2025-08-07T18:42:10Z"

# restore the backups

juju run velero-operator/0 restore backup-uid=85662948-8e5e-4922-8e1c-c5568eafa6e7

juju run velero-operator/0 restore backup-uid=83503892-a24a-409b-b0df-553dcc2465ec

# check that the resources were backup
kubectl get role pod-reader
kubectl get clusterrole pod-reader
```

---
