SpectroCloud/PaletteBackup: Difference between revisions

From DER's LLC
Jump to navigation Jump to search
(Created page with "= Palette Backup and Restore Tool = This tool provides full API-based backup and restore capabilities for a self-hosted SpectroCloud Palette instance. == Features == * Backup and restore via **Palette API** * Supports local user login or API token authentication * Backup includes: - Tenants - Projects - Users (with optional redaction) - Roles - SSH Keys - Cloud Accounts - Cluster Profiles - Git Repositories - Blueprints - Clusters (metadata) - Mar...")
 
 
(One intermediate revision by the same user not shown)
Line 50: Line 50:


=== Common Options ===
=== Common Options ===
| Flag             | Description |
| Flag                       | Description                                 |
|-------------------|-------------|
|-----------------------------|----------------------------------------------|
| `--mode`         | `backup` or `restore` (required) |
| `--mode`                   | `backup` or `restore` (required)             |
| `--endpoint`     | Palette API base URL |
| `--endpoint`               | Palette API base URL                         |
| `--directory`     | Backup root path |
| `--directory`               | Backup root path                             |
| `--backup`       | Subfolder (timestamp) to restore from |
| `--backup`                 | Subfolder (timestamp) to restore from       |
| `--only`         | Comma-separated list of resource types |
| `--only`                   | Comma-separated list of resource types       |
| `--force`         | Overwrite existing objects |
| `--force`                   | Overwrite existing objects                   |
| `--max-backups`   | Max folders to keep (backup mode only) |
| `--max-backups`             | Max folders to keep (backup mode only)       |
| `--redact`       | Remove sensitive fields (users) |
| `--redact`                 | Remove sensitive fields (users)             |
| `--username` / `--password` | Login credentials (prompted if not provided) |
| `--username` / `--password` | Login credentials (prompted if not provided) |
| `--api-key`       | Token auth (bypasses login) |
| `--api-key`                 | Token auth (bypasses login)                 |


=== Supported Resource Types ===
=== Supported Resource Types ===

Latest revision as of 13:10, 15 April 2025

Palette Backup and Restore Tool

This tool provides full API-based backup and restore capabilities for a self-hosted SpectroCloud Palette instance.

Features

  • Backup and restore via **Palette API**
  • Supports local user login or API token authentication
  • Backup includes:
 - Tenants
 - Projects
 - Users (with optional redaction)
 - Roles
 - SSH Keys
 - Cloud Accounts
 - Cluster Profiles
 - Git Repositories
 - Blueprints
 - Clusters (metadata)
 - Marketplace Items
  • Fine-grained control via `--only`
  • Auto-cleanup of old backups via `--max-backups`
  • Intelligent restore ordering
  • Interactive fallback if flags are omitted

Requirements

Installation

pip install httpx

Usage

Backup

python palette-backup.py --mode=backup \
 --endpoint=https://paas.dersllc.com \
 --directory=/mnt/backups \
 --max-backups=5 \
 --redact


Restore

python palette-backup.py --mode=restore \
 --endpoint=https://paas.dersllc.com \
 --directory=/mnt/backups \
 --backup=2025-04-15_03-00 \
 --force


Common Options

| Flag                        | Description                                  |
|-----------------------------|----------------------------------------------|
| `--mode`                    | `backup` or `restore` (required)             |
| `--endpoint`                | Palette API base URL                         |
| `--directory`               | Backup root path                             |
| `--backup`                  | Subfolder (timestamp) to restore from        |
| `--only`                    | Comma-separated list of resource types       |
| `--force`                   | Overwrite existing objects                   |
| `--max-backups`             | Max folders to keep (backup mode only)       |
| `--redact`                  | Remove sensitive fields (users)              |
| `--username` / `--password` | Login credentials (prompted if not provided) |
| `--api-key`                 | Token auth (bypasses login)                  |

Supported Resource Types

- `tenants`
- `projects`
- `users`
- `roles`
- `keys`
- `cloud`
- `profiles`
- `repos`
- `blueprints`
- `clusters`
- `marketplace`

Notes

  • Redacted backups will exclude passwords and tokens from user records.
  • Restore operations skip existing resources unless `--force` is used.
  • Resource creation order is dependency-aware (e.g., tenants → projects → users).

License

MIT or internal use.

Maintainer

Daniel Roessner