Backup Configuration

This guide explains how to view and create BackupConfiguration resources using the AppsCode console. A BackupConfiguration defines a complete backup policy for a database — including the storage backend, retention policy, backup sessions with their schedules and tasks, and the target database to back up.


1. Getting Started

Navigate to Backups in the left sidebar and select Backup Configuration. This opens the BackupConfiguration list page showing all existing configurations in your cluster.


2. BackupConfiguration List

The list page shows all BackupConfigurations across namespaces. Use the Select Namespace dropdown in the top-right to filter by namespace, or click Create New Instance to create a new one.

BackupConfiguration list page showing existing configurations with Name, Namespace, Schedule, Repository, BackupStorage, Target, Task, RetentionPolicy, Phase, and Age columns

ColumnDescription
NameThe name of the BackupConfiguration resource.
NamespaceThe namespace where it is deployed.
ScheduleThe cron expression defining the backup frequency.
PausedWhether the backup schedule is currently paused.
RepositoryThe repository used to store backup snapshots.
BackupStorageThe underlying storage backend.
TargetThe database resource being backed up.
TaskThe backup task type (e.g., logical-backup).
RetentionPolicyThe policy controlling how long backups are kept.
PhaseThe current status of the BackupConfiguration (e.g., Ready).
AgeHow long ago the resource was created.

3. Viewing a BackupConfiguration

Click on any BackupConfiguration name in the list to open its detail page. The detail page is divided into several panels giving a full picture of the configuration's state and linked resources.

3.1 - Overview

The detail page opens on the Overview tab, which shows the following sections:

BackupConfiguration detail page showing Basic info, Backup Sessions table, Retention Policies table, and Target section

Basic — Core metadata for the resource:

FieldDescription
NameThe BackupConfiguration resource name.
NamespaceThe namespace it belongs to.
LabelsKey-value labels attached to the resource.
AnnotationsKey-value annotations including managed-by and apply-configuration references.
UIDThe unique Kubernetes identifier for this resource.
PhaseCurrent lifecycle phase (e.g., Ready).
PausedWhether the backup schedule is paused (true / false).

Backup Sessions — Lists all active backup sessions linked to this configuration:

ColumnDescription
NameThe name of the BackupSession resource.
NamespaceNamespace of the BackupSession.
Invoker KindThe resource type that triggered the session (e.g., BackupConfiguration).
Invoker NameThe name of the invoker resource.
SessionThe session name within the configuration (e.g., full-backup).
Total snapshotsNumber of snapshots created in this session.
PhaseCurrent status of the session (e.g., Succeeded, Running).
DurationTime taken to complete the session.
AgeHow long ago the session was created.

Retention Policies — Lists the RetentionPolicy resources linked to this configuration:

ColumnDescription
NameThe RetentionPolicy resource name.
AnnotationsAnnotations referencing the linked namespace and name.
AgeAge of the RetentionPolicy resource.
Max Retention PeriodHow long backups are kept before being pruned.
DefaultWhether this is the default retention policy.

Target — Identifies the database resource being backed up. Shown as "No data available" if the target database has been removed or is not yet bound.

3.2 - Repository, BackupStorage and CronJobs

Scroll down on the detail page to view the linked infrastructure resources.

Detail page lower section showing Repository, BackupStorage, and CronJobs tables

Repository — The backup repository storing snapshots for this configuration:

ColumnDescription
NameThe repository resource name.
NamespaceNamespace of the repository.
SizeTotal size of all stored snapshots (e.g., 71.001 KiB).
Snapshot CountNumber of snapshots currently stored.
TargetThe database this repository backs up (e.g., MongoDB demo/mongodb).
Last-Successful-BackupTime elapsed since the last successful backup.
IntegrityWhether the repository integrity check passed (TRUE / FALSE).
AgeAge of the repository resource.

BackupStorage — The underlying storage backend connected to this configuration:

ColumnDescription
NameThe BackupStorage resource name.
NamespaceNamespace of the BackupStorage.
ProviderStorage provider (e.g., s3).
SizeTotal data stored across all connected repositories.
No. of Connected RepositoriesNumber of repositories using this storage.
StatusCurrent state of the storage backend (e.g., Ready).
AgeAge of the BackupStorage resource.

CronJobs — The Kubernetes CronJob resources created to run backup sessions on schedule:

ColumnDescription
NameThe CronJob resource name (e.g., trigger-mongodb-full-backup).
NamespaceNamespace of the CronJob.
AnnotationsAnnotations linking the CronJob to the BackupConfiguration instance.
ScheduleThe cron expression driving the backup schedule (e.g., */15 * * * *).
SuspendWhether the CronJob is currently suspended (true / false).
ActiveNumber of currently active job runs.
Last ScheduleTime elapsed since the CronJob last triggered.
AgeAge of the CronJob resource.

4. Creating a BackupConfiguration

To create a new BackupConfiguration, click Create New Instance from the list page. The Create BackupConfiguration form will open containing the following sections:

  • Namespace / Name / Storage Ref / Retention Policy — Core identity and storage fields.
  • Labels & Annotations — Optional metadata for the resource.
  • Sessions — One or more backup sessions defining schedule, addon, and tasks.
  • Target — The database resource this BackupConfiguration applies to.

Create BackupConfiguration form showing Namespace, Name, Storage Ref, Retention Policy, Sessions, and Target sections

4.1 - Basic Information

The top section captures the core identity and storage references for the BackupConfiguration.

Basic fields showing Namespace set to demo, Name to test-name, Storage Ref to stash/default, and Retention Policy to stash/default

FieldDescription
NamespaceThe Kubernetes namespace where the BackupConfiguration will be created. Required.
NameA unique name for this BackupConfiguration (e.g., test-name). Required.
Storage RefReference to the BackupStorage resource that defines where backups are stored (e.g., stash/default). Required.
Retention PolicyReference to the RetentionPolicy resource that controls how long backups are kept (e.g., stash/default). Required.

Note: All four fields are required (marked with a red asterisk). The Storage Ref and Retention Policy dropdowns list existing resources available in your cluster.

4.2 - Labels & Annotations

Expand the Labels & Annotations panel to attach custom metadata to the BackupConfiguration resource for organization, filtering, or integration with other Kubernetes tools.

Labels and Annotations panel showing Labels and Annotations each with Key-Value input rows and Add new buttons

  • Use + Add new under Labels to add key-value label pairs.
  • Use + Add new under Annotations to add key-value annotation pairs.
  • Use the delete icon on any row to remove an entry.

4.3 - Sessions

The Sessions section defines one or more backup sessions. Each session specifies when the backup runs, which addon to use, and what tasks to execute. Click + Add new to add a session entry.

Sessions panel showing a session entry with Session Name, Schedule, Security Context, Addon Name, and Tasks fields

FieldDescription
Session NameA unique name for this backup session (e.g., full-backup).
ScheduleA cron expression defining when this session runs (e.g., */30 * * * * for every 30 minutes).
Security Context (runAsUser)The UID the backup job container runs as.
Addon NameThe backup addon to use for this session. Select from the dropdown.

Use the Delete button at the bottom of a session entry to remove it.

4.3.1 - Session Tasks

Each session must have at least one Task defined. Tasks describe the actual backup operation to perform. Click Add new inside the Tasks section to add a task entry.

Tasks entry showing Task Name required dropdown and Params code editor

FieldDescription
Task NameThe name of the backup task to execute. Select from the dropdown. Required.
Encryption Secret NamespaceThe namespace of the Kubernetes Secret holding the encryption key.
Encryption Secret NameThe name of the Kubernetes Secret holding the encryption key.
Repo NameThe name of the repository within the storage backend where this task writes backups.
ParamsOptional task-specific parameters in YAML format entered in the code editor.

Note: Task Name is required. Use the Delete button at the bottom of a task entry to remove it. Multiple tasks can be added to a single session using Add new.

4.4 - Target

The Target section identifies the database resource that this BackupConfiguration will back up.

Target panel showing Api Group kubedb.com, Kind MongoDB, Namespace demo, and Name mongodb

FieldDescription
Api GroupThe API group of the target resource (e.g., kubedb.com). Required.
KindThe resource kind of the target database (e.g., MongoDB). Required.
NamespaceThe namespace where the target database resides (e.g., demo). Required.
NameThe name of the target database instance (e.g., mongodb). Required.

Note: All four Target fields are required. If any are missing, the form will display an "Error in fields" warning on the Target panel header.


5. Preview and Submit

Once all required fields are filled, click Preview to review the generated BackupConfiguration manifest before applying it.

  • The manifest is shown in YAML view by default. Use the JSON button to switch to JSON format if preferred.
  • Use the Copy button to copy the manifest to your clipboard.
  • Click Previous to go back and adjust your settings if needed.

Tip: You can directly edit the YAML or JSON on the Preview page before submitting. This is useful for making precise adjustments beyond what the form fields expose.

  1. Submit: Once satisfied, click Submit to create the BackupConfiguration in your cluster.

Note: After submitting, the BackupConfiguration will immediately begin scheduling backup sessions according to the cron expressions you defined.


Quick Reference

ActionHow to do it
View all BackupConfigurationsBackupsBackup Configuration
Filter by namespaceUse the Select Namespace dropdown on the list page
View detail of a configClick on the BackupConfiguration name in the list
Check backup session statusDetail page → Backup Sessions table
Check repository integrityDetail page → Repository table → Integrity column
View linked CronJobsDetail page → CronJobs table
Open the create formList page → Create New Instance
Set storage backendStorage Ref dropdown → select a BackupStorage resource
Set retention policyRetention Policy dropdown → select a RetentionPolicy resource
Add labels or annotationsLabels & Annotations+ Add new → enter Key and Value
Add a backup sessionSessions+ Add new → fill Session Name, Schedule, Addon Name
Add a task to a sessionTasksAdd new → select Task Name → optionally add Params
Encrypt backup dataTasks → set Encryption Secret Namespace and Encryption Secret Name
Set the backup targetTarget → fill Api Group, Kind, Namespace, and Name
Review before creatingClick Preview
Edit manifest directlyUse the YAML / JSON toggle on the Preview page
Create the configurationClick Submit on the Preview page