# onliveserver/cbackup architecture

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

- Interactive diagram: https://gitdiagram.com/onliveserver/cbackup
- Repository: https://github.com/onliveserver/cbackup

## Overview

cbackup is a Bash command-line tool for backing up cPanel accounts and MySQL databases, with remote transfer, retrieval, restore, and search features. The documented workflow starts with a user invoking the CLI; it then performs the requested backup or remote operation. The repository tree identifies cbackup.sh and cbackup.conf, but no source excerpts were provided, so internal calls and implementation details cannot be verified. Edges below reflect README-documented capabilities, not inspected source-level control flow.

Main entry points: [`cbackup.sh`](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh) (cbackup CLI), [`cbackup.conf`](https://github.com/onliveserver/cbackup/blob/main/cbackup.conf) (Remote settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["CLI and configuration"]
  node_cli["cbackup CLI<br/>[cbackup.sh]"]
  node_config["Remote settings<br/>[cbackup.conf]"]
end

subgraph group_backups["Backup operations"]
  node_account_backup["Account backups<br/>[cbackup.sh]"]
  node_mysql_backup["MySQL backups<br/>[cbackup.sh]"]
  node_cpanel["cPanel accounts"]
  node_mysql[("MySQL databases")]
end

subgraph group_remote["Remote operations"]
  node_remote_check["Remote existence check<br/>[cbackup.sh]"]
  node_upload["Automatic upload<br/>[cbackup.sh]"]
  node_download_restore["Download or restore<br/>[cbackup.sh]"]
  node_remote_server["Remote server"]
end

subgraph group_lookup["Backup lookup"]
  node_search["User/domain search<br/>[cbackup.sh]"]
  node_backup_records["Backup records"]
end

node_operator(("Operator"))

node_operator -->|"invokes"| node_cli
node_cli -->|"uses settings"| node_config
node_cli -->|"supports"| node_account_backup
node_cli -->|"supports"| node_mysql_backup
node_account_backup -->|"backs up"| node_cpanel
node_mysql_backup -->|"backs up"| node_mysql
node_cli -->|"supports"| node_upload
node_cli -->|"supports"| node_remote_check
node_cli -->|"supports"| node_download_restore
node_upload -->|"uploads to"| node_remote_server
node_remote_check -->|"checks"| node_remote_server
node_download_restore -->|"retrieves from"| node_remote_server
node_cli -->|"supports"| node_search
node_search -->|"searches"| node_backup_records

click node_cli "https://github.com/onliveserver/cbackup/blob/main/cbackup.sh"
click node_config "https://github.com/onliveserver/cbackup/blob/main/cbackup.conf"
click node_account_backup "https://github.com/onliveserver/cbackup/blob/main/cbackup.sh"
click node_mysql_backup "https://github.com/onliveserver/cbackup/blob/main/cbackup.sh"
click node_remote_check "https://github.com/onliveserver/cbackup/blob/main/cbackup.sh"
click node_upload "https://github.com/onliveserver/cbackup/blob/main/cbackup.sh"
click node_download_restore "https://github.com/onliveserver/cbackup/blob/main/cbackup.sh"
click node_search "https://github.com/onliveserver/cbackup/blob/main/cbackup.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_cli,node_config toneBlue
class node_account_backup,node_mysql_backup,node_cpanel,node_mysql toneAmber
class node_remote_check,node_upload,node_download_restore,node_remote_server toneMint
class node_search,node_backup_records toneRose
class node_operator toneIndigo
```

## Components

### CLI and configuration

- [cbackup CLI](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh): `cbackup.sh`
- [Remote settings](https://github.com/onliveserver/cbackup/blob/main/cbackup.conf): `cbackup.conf`

### Backup operations

- [Account backups](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh): `cbackup.sh`
- [MySQL backups](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh): `cbackup.sh`
- **cPanel accounts**
- **MySQL databases**

### Remote operations

- [Remote existence check](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh): `cbackup.sh`
- [Automatic upload](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh): `cbackup.sh`
- [Download or restore](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh): `cbackup.sh`
- **Remote server**

### Backup lookup

- [User/domain search](https://github.com/onliveserver/cbackup/blob/main/cbackup.sh): `cbackup.sh`
- **Backup records**

### Other components

- **Operator**

## Connections

- Operator → cbackup CLI: invokes (evidence: `README.md`)
- cbackup CLI → Remote settings: uses settings (evidence: `README.md`)
- cbackup CLI → Account backups: supports (evidence: `README.md`)
- cbackup CLI → MySQL backups: supports (evidence: `README.md`)
- Account backups → cPanel accounts: backs up (evidence: `README.md`)
- MySQL backups → MySQL databases: backs up (evidence: `README.md`)
- cbackup CLI → Automatic upload: supports (evidence: `README.md`)
- cbackup CLI → Remote existence check: supports (evidence: `README.md`)
- cbackup CLI → Download or restore: supports (evidence: `README.md`)
- Automatic upload → Remote server: uploads to (evidence: `README.md`)
- Remote existence check → Remote server: checks (evidence: `README.md`)
- Download or restore → Remote server: retrieves from (evidence: `README.md`)
- cbackup CLI → User/domain search: supports (evidence: `README.md`)
- User/domain search → Backup records: searches (evidence: `README.md`)
