# andrewlinuxadmin/backup_exadata_kvm architecture

> Architecture diagram of the GitHub repository andrewlinuxadmin/backup_exadata_kvm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andrewlinuxadmin/backup_exadata_kvm
- Repository: https://github.com/andrewlinuxadmin/backup_exadata_kvm

## Overview

This repository is an Ansible workflow for backing up Exadata KVM VMs to NFS. The documented path is: an operator starts the playbook, which validates the destination, discovers VMs and plans space and retention before running the per-VM role; the playbook then reports any failures. The role creates temporary reflink copies, archives and verifies them, cleans up, and records checksums and reports. Relationships below follow the README; no source excerpts were available to confirm task-level implementation details.

Main entry points: [`roles/backup_exadata_kvm/tasks/main.yml`](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml) (Per-VM role), [`backup_kvm.yml`](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml) (Validate and timestamp), [`roles/backup_exadata_kvm/defaults/main.yml`](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/defaults/main.yml) (Role defaults)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Run orchestration"]
  node_playbook["Backup playbook<br/>[backup_kvm.yml]"]
  node_run_setup["Validate and timestamp<br/>[backup_kvm.yml]"]
  node_vm_discovery["Discover VMs<br/>[backup_kvm.yml]"]
  node_failure_summary["Summarize failures<br/>[backup_kvm.yml]"]
end

subgraph group_capacity["Space and retention"]
  node_capacity_plan["Plan space and retention<br/>[backup_kvm.yml]"]
  node_retention_cleanup["Remove old backups<br/>[backup_kvm.yml]"]
end

subgraph group_vmbackup["Per-VM backup"]
  node_role_config["Role defaults<br/>[main.yml]"]
  node_vm_role["Per-VM role<br/>[main.yml]"]
  node_staging["Stage XML and reflinks<br/>[main.yml]"]
  node_archive["Create tar archive<br/>[main.yml]"]
  node_verification["Verify archive<br/>[main.yml]"]
  node_cleanup["Remove temporary data<br/>[main.yml]"]
  node_records["Checksum and reports<br/>[main.yml]"]
end

node_operator(("Operator"))
node_nfs[("NFS destination")]
node_vmimages[("KVM VM images")]

node_operator -->|"runs"| node_playbook
node_playbook -->|"starts"| node_run_setup
node_run_setup -->|"checks mount"| node_nfs
node_run_setup -->|"then discovers"| node_vm_discovery
node_vm_discovery -->|"searches"| node_vmimages
node_vm_discovery -->|"sizes VMs"| node_capacity_plan
node_capacity_plan -->|"checks capacity"| node_nfs
node_capacity_plan -->|"plans removal"| node_retention_cleanup
node_retention_cleanup -->|"removes backups"| node_nfs
node_retention_cleanup -->|"then runs per VM"| node_vm_role
node_role_config -->|"configures"| node_vm_role
node_vm_role -->|"creates staging"| node_staging
node_staging -->|"reads images"| node_vmimages
node_staging -->|"provides staged files"| node_archive
node_archive -->|"writes tar"| node_nfs
node_archive -->|"then verifies"| node_verification
node_verification -->|"compares archive"| node_nfs
node_verification -->|"then cleans"| node_cleanup
node_cleanup -->|"then records"| node_records
node_records -->|"writes checksum and report"| node_nfs
node_vm_role -->|"returns failures"| node_failure_summary
node_failure_summary -->|"reports failures"| node_operator

click node_playbook "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml"
click node_run_setup "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml"
click node_vm_discovery "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml"
click node_capacity_plan "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml"
click node_retention_cleanup "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml"
click node_role_config "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/defaults/main.yml"
click node_vm_role "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml"
click node_staging "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml"
click node_archive "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml"
click node_verification "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml"
click node_cleanup "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml"
click node_records "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml"
click node_failure_summary "https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml"

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_playbook,node_run_setup,node_vm_discovery,node_failure_summary toneBlue
class node_capacity_plan,node_retention_cleanup,node_nfs,node_vmimages toneAmber
class node_role_config,node_vm_role,node_staging,node_archive,node_verification,node_cleanup,node_records toneMint
class node_operator toneIndigo
```

## Components

### Run orchestration

- [Backup playbook](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml): `backup_kvm.yml`
- [Validate and timestamp](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml): `backup_kvm.yml`
- [Discover VMs](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml): `backup_kvm.yml`
- [Summarize failures](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml): `backup_kvm.yml`

### Space and retention

- [Plan space and retention](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml): `backup_kvm.yml`
- [Remove old backups](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/backup_kvm.yml): `backup_kvm.yml`

### Per-VM backup

- [Role defaults](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/defaults/main.yml): `roles/backup_exadata_kvm/defaults/main.yml`
- [Per-VM role](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml): `roles/backup_exadata_kvm/tasks/main.yml`
- [Stage XML and reflinks](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml): `roles/backup_exadata_kvm/tasks/main.yml`
- [Create tar archive](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml): `roles/backup_exadata_kvm/tasks/main.yml`
- [Verify archive](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml): `roles/backup_exadata_kvm/tasks/main.yml`
- [Remove temporary data](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml): `roles/backup_exadata_kvm/tasks/main.yml`
- [Checksum and reports](https://github.com/andrewlinuxadmin/backup_exadata_kvm/blob/main/roles/backup_exadata_kvm/tasks/main.yml): `roles/backup_exadata_kvm/tasks/main.yml`

### Other components

- **Operator**
- **NFS destination**
- **KVM VM images**

## Connections

- Operator → Backup playbook: runs (evidence: `README.md`)
- Backup playbook → Validate and timestamp: starts (evidence: `README.md`)
- Validate and timestamp → NFS destination: checks mount (evidence: `README.md`)
- Validate and timestamp → Discover VMs: then discovers (evidence: `README.md`)
- Discover VMs → KVM VM images: searches (evidence: `README.md`)
- Discover VMs → Plan space and retention: sizes VMs (evidence: `README.md`)
- Plan space and retention → NFS destination: checks capacity (evidence: `README.md`)
- Plan space and retention → Remove old backups: plans removal (evidence: `README.md`)
- Remove old backups → NFS destination: removes backups (evidence: `README.md`)
- Remove old backups → Per-VM role: then runs per VM (evidence: `README.md`)
- Role defaults → Per-VM role: configures (evidence: `README.md`)
- Per-VM role → Stage XML and reflinks: creates staging (evidence: `README.md`)
- Stage XML and reflinks → KVM VM images: reads images (evidence: `README.md`)
- Stage XML and reflinks → Create tar archive: provides staged files (evidence: `README.md`)
- Create tar archive → NFS destination: writes tar (evidence: `README.md`)
- Create tar archive → Verify archive: then verifies (evidence: `README.md`)
- Verify archive → NFS destination: compares archive (evidence: `README.md`)
- Verify archive → Remove temporary data: then cleans (evidence: `README.md`)
- Remove temporary data → Checksum and reports: then records (evidence: `README.md`)
- Checksum and reports → NFS destination: writes checksum and report (evidence: `README.md`)
- Per-VM role → Summarize failures: returns failures (evidence: `README.md`)
- Summarize failures → Operator: reports failures (evidence: `README.md`)
