SpectroCloud/PaletteBackup
Jump to navigation
Jump to search
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