# mutazn/backup-and-restore-aks-cluster-using-velero architecture

> Architecture diagram of the GitHub repository mutazn/backup-and-restore-aks-cluster-using-velero, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mutazn/backup-and-restore-aks-cluster-using-velero
- Repository: https://github.com/mutazn/backup-and-restore-aks-cluster-using-velero

## Overview

This repository provides two interactive Bash scripts for backing up an AKS cluster with Velero and restoring or migrating that backup to another AKS cluster. The documented workflow provisions shared Azure blob storage and source-cluster Velero, then configures Velero on the target cluster to access the backup. The README also describes disk-snapshot migration for cross-subscription restores. Source excerpts were unavailable, so relationships below reflect README documentation only.

Main entry points: [`source-aks-cluster.sh`](https://github.com/mutazn/backup-and-restore-aks-cluster-using-velero/blob/main/source-aks-cluster.sh) (Source setup script), [`target-aks-cluster.sh`](https://github.com/mutazn/backup-and-restore-aks-cluster-using-velero/blob/main/target-aks-cluster.sh) (Target setup script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_source["Source setup"]
  node_source_script["Source setup script"]
  node_source_cluster["Source AKS"]
  node_source_velero["Source Velero"]
end

subgraph group_backup["Backup storage"]
  node_azure_storage[("Backup blob storage")]
  node_disk_snapshots[("Disk snapshots")]
end

subgraph group_restore["Target restore"]
  node_target_script["Target setup script"]
  node_target_cluster["Target AKS"]
  node_target_velero["Target Velero"]
end

node_operator(("Cluster operator"))
node_azure_cli["Azure CLI"]

node_operator -->|"runs setup"| node_source_script
node_source_script -->|"provisions storage"| node_azure_cli
node_source_script -->|"sets permissions"| node_azure_cli
node_source_script -->|"installs Velero"| node_source_cluster
node_source_script -->|"patches deployment"| node_source_cluster
node_azure_cli -->|"creates container"| node_azure_storage
node_source_velero -->|"stores backups"| node_azure_storage
node_source_velero -->|"captures snapshots"| node_disk_snapshots
node_operator -->|"runs setup"| node_target_script
node_target_script -->|"sets permissions"| node_azure_cli
node_target_script -->|"installs Velero"| node_target_cluster
node_target_velero -->|"reads backups"| node_azure_storage
node_target_velero -->|"uses snapshots"| node_disk_snapshots
node_target_velero -->|"restores workloads"| node_target_cluster

click node_source_script "https://github.com/mutazn/backup-and-restore-aks-cluster-using-velero/blob/main/source-aks-cluster.sh"
click node_target_script "https://github.com/mutazn/backup-and-restore-aks-cluster-using-velero/blob/main/target-aks-cluster.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_source_script,node_source_cluster,node_source_velero toneBlue
class node_azure_storage,node_disk_snapshots toneAmber
class node_target_script,node_target_cluster,node_target_velero toneMint
class node_operator,node_azure_cli toneIndigo
```

## Components

### Source setup

- [Source setup script](https://github.com/mutazn/backup-and-restore-aks-cluster-using-velero/blob/main/source-aks-cluster.sh): `source-aks-cluster.sh`
- **Source AKS**
- **Source Velero**

### Backup storage

- **Backup blob storage**
- **Disk snapshots**

### Target restore

- [Target setup script](https://github.com/mutazn/backup-and-restore-aks-cluster-using-velero/blob/main/target-aks-cluster.sh): `target-aks-cluster.sh`
- **Target AKS**
- **Target Velero**

### Other components

- **Cluster operator**
- **Azure CLI**

## Connections

- Cluster operator → Source setup script: runs setup
- Source setup script → Azure CLI: provisions storage
- Source setup script → Azure CLI: sets permissions
- Source setup script → Source AKS: installs Velero
- Source setup script → Source AKS: patches deployment
- Azure CLI → Backup blob storage: creates container
- Source Velero → Backup blob storage: stores backups
- Source Velero → Disk snapshots: captures snapshots
- Cluster operator → Target setup script: runs setup
- Target setup script → Azure CLI: sets permissions
- Target setup script → Target AKS: installs Velero
- Target Velero → Backup blob storage: reads backups
- Target Velero → Disk snapshots: uses snapshots
- Target Velero → Target AKS: restores workloads
