SpectroCloud/PaletteBackup: Difference between revisions
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...") |
|||
Line 50: | Line 50: | ||
=== Common Options === | === Common Options === | ||
| Flag | | Flag | Description | | ||
|-------------------|-------------| | |-----------------------------|----------------------------------------------| | ||
| `--mode` | | `--mode` | `backup` or `restore` (required) | | ||
| `--endpoint` | | `--endpoint` | Palette API base URL | | ||
| `--directory` | | `--directory` | Backup root path | | ||
| `--backup` | | `--backup` | Subfolder (timestamp) to restore from | | ||
| `--only` | | `--only` | Comma-separated list of resource types | | ||
| `--force` | | `--force` | Overwrite existing objects | | ||
| `--max-backups` | | `--max-backups` | Max folders to keep (backup mode only) | | ||
| `--redact` | | `--redact` | Remove sensitive fields (users) | | ||
| `--username` / `--password` | Login credentials (prompted if not provided) | | | `--username` / `--password` | Login credentials (prompted if not provided) | | ||
| `--api-key` | | `--api-key` | Token auth (bypasses login) | | ||
|-----------------------------|----------------------------------------------| | |||
=== Supported Resource Types === | === Supported Resource Types === |
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
- Python 3.8+
- `httpx`
- Access to a running Palette API (e.g., `https://paas.dersllc.com`)
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