Repository

This guide explains how to view and create Repository resources using the AppsCode console. A Repository is the logical backup repository that stores individual snapshots of a database within a BackupStorage backend. It acts as the bridge between BackupConfigurations and the actual cloud storage.


1. Getting Started

Navigate to Backups in the left sidebar and select Repository. This opens the Repository list page showing all backup repositories in your cluster.


2. Repository List

The list page displays all Repository resources configured across your cluster. Use the Select Namespace dropdown to filter by namespace, or click Create New Instance to add a new repository.

Repository list page showing resources with Name, Namespace, BackupStorage, Target, Size, Phase, and Age columns

ColumnDescription
NameThe Repository resource name.
NamespaceThe namespace where it is deployed.
BackupStorageThe BackupStorage backend this repository uses.
TargetThe database this repository backs up.
SizeTotal size of all snapshots in this repository.
PhaseCurrent state of the repository (e.g., Ready, Failed).
AgeHow long ago the Repository was created.

3. Viewing a Repository

Click on any Repository name in the list to open its detail page. The detail page displays repository metadata and all snapshots stored within it.

3.1 - Overview

The detail page shows comprehensive information about the repository:

Repository detail page showing Basic info, Backup Storage, Snapshots, and linked resources

Basic — Core metadata for the repository:

FieldDescription
NameThe Repository resource name.
NamespaceThe namespace it belongs to.
LabelsKey-value labels for organization and filtering.
AnnotationsKey-value annotations including references and management info.
UIDThe unique Kubernetes identifier.
PhaseCurrent lifecycle phase (e.g., Ready).
Integrity StatusWhether the repository passed integrity validation (e.g., OK).
Last Integrity Check TimeTimestamp of the most recent integrity verification.

Backup Storage — Reference to the underlying storage backend:

ColumnDescription
NameThe BackupStorage resource name.
NamespaceNamespace of the BackupStorage.
ProviderThe cloud provider (e.g., s3, azure).
SizeTotal data stored across all repositories in this backend.
No. of Connected RepositoriesNumber of repositories using this storage.
StatusStorage backend status.
AgeAge of the BackupStorage resource.

Snapshots — Individual backup snapshots stored in this repository:

Backup Configuration and Snapshots tables showing all stored snapshots

Backup Configuration — BackupConfigurations using this repository:

ColumnDescription
NameThe BackupConfiguration resource name.
NamespaceNamespace of the configuration.
ScheduleThe cron expression for backups.
PausedWhether backups are currently paused.
TargetThe database being backed up.
SessionThe session name within the configuration.
StatusConfiguration status.
AgeAge of the BackupConfiguration resource.

Snapshots — All snapshots (backup snapshots) stored in this repository:

ColumnDescription
NameThe Snapshot resource name (e.g., snapshot-20240115-143022).
NamespaceNamespace of the snapshot.
RepositoryThe repository containing this snapshot.
Invoker KindType of resource that created the snapshot (e.g., BackupSession).
Invoker NameName of the invoker resource.
Backend RepositoryThe backend-level repository path.
Creation TimestampWhen the snapshot was created.
Deletion PolicyWhat happens when the snapshot is deleted.
PhaseStatus of the snapshot (e.g., Ready, Failed).
Verification StatusWhether the snapshot data is valid (e.g., OK).
AgeAge of the Snapshot resource.

4. Creating a Repository

To create a new Repository, click Create New Instance from the Repository list page. The Create Repository form will open.

4.1 - Basic Information

The form starts with identity and deletion policy fields:

Create Repository form showing Namespace, Repository Name, Labels & Annotations, Deletion Policy, Storage Ref, Encryption Secret, Path, and App Ref sections

FieldDescription
NamespaceThe Kubernetes namespace where the Repository will be created. Required.
Repository NameA unique name for this Repository (e.g., mongodb-backups). Required.
Deletion PolicyControls what happens when the Repository is deleted. Default: Delete. Required.

4.2 - Labels & Annotations

Expand the Labels & Annotations section to attach custom metadata:

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 - Storage and Encryption Configuration

The Storage Ref, Encryption Secret, and Path sections configure where and how snapshots are stored.

Storage Ref and Encryption Secret sections showing Namespace/Name fields and Path field

Storage Ref — Reference to the BackupStorage backend:

FieldDescription
NamespaceThe namespace of the BackupStorage resource. Required.
NameThe name of the BackupStorage resource. Required.

Encryption Secret — Optional Kubernetes Secret containing encryption keys:

FieldDescription
NamespaceThe namespace of the encryption Secret. Optional.
NameThe name of the Kubernetes Secret holding encryption keys. Optional.

Path — The path prefix within the BackupStorage backend:

FieldDescription
PathThe directory path where snapshots are stored (e.g., mongodb/demo-db). Required.

4.4 - App Reference

The App Ref section identifies the database resource this repository backs up.

App Ref section showing Api Group, Kind, Namespace, and Name dropdowns

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. Required.
NameThe name of the target database instance. Required.

5. Preview and Submit

Once all required fields are filled, click Preview to review the generated Repository 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 Repository in your cluster.

Note: After submitting, the Repository will be created and validated. Once Phase shows Ready, BackupConfigurations can reference it for storing snapshots.


Quick Reference

ActionHow to do it
View all RepositoriesBackupsRepository
Filter by namespaceUse the Select Namespace dropdown on the list page
View repository detailClick on the Repository name in the list
Check snapshots storedDetail page → Snapshots table
Check linked configurationsDetail page → Backup Configuration table
Check repository statusDetail page → Basic section → Phase field
Check integrity statusDetail page → Basic section → Integrity Status field
Open the create formList page → Create New Instance
Add labels or annotationsLabels & Annotations+ Add new → enter Key and Value
Reference a BackupStorageStorage Ref → set Namespace and Name
Set encryption for backupsEncryption Secret → optionally set Namespace and Name
Set storage pathPath field → enter directory path for snapshots
Set the database targetApp Ref → fill Api Group, Kind, Namespace, and Name
Review before creatingClick Preview
Edit manifest directlyUse the YAML / JSON toggle on the Preview page
Create the repositoryClick Submit on the Preview page