Phase 6: remote backup destinations — SFTP & S3 (0.6.0)

- BackupDestination model + backup_destination_service (SFTP via paramiko,
  S3-compatible via boto3): upload/list/download/delete/test.
- routers/destinations.py: destinations CRUD (secrets masked, merge-on-update),
  test, list/delete remote backups. backups.py: POST /{id}/backup/push and
  POST /restore-from (download from a destination + restore, volumes included).
- Frontend: Settings → Backup destinations (SFTP/S3 forms + test); Backup dialog
  can push to a destination; Restore dialog can pick a destination + backup.
- deps: paramiko 3.5.0, boto3 1.35.99.

Verified end-to-end against live MinIO + atmoz/sftp: create/test destinations,
push (incl. volumes), list, restore-from to a fresh stack (volume data intact),
delete remote backup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-06-07 21:50:03 +00:00
co-authored by Claude Opus 4.8
parent 59037f4287
commit 7bd449101d
12 changed files with 999 additions and 42 deletions
+21 -4
View File
@@ -4,8 +4,8 @@ A self-hosted Docker Compose manager for power users and homelab enthusiasts —
as intuitive as Dockge, as capable as Portainer for Compose workflows.
> **Status:** Phase 1 (Core) + Phase 2 (Volumes & GPU) + Phase 3 (Quality of
> Life) + Phase 4 (Operations) + Phase 5 (Multi-host) complete. Remote backup
> destinations (SFTP/S3) are planned for a later phase.
> Life) + Phase 4 (Operations) + Phase 5 (Multi-host) + Phase 6 (Backup
> destinations) complete.
## What works today (Phase 1)
@@ -81,8 +81,15 @@ as intuitive as Dockge, as capable as Portainer for Compose workflows.
with full lifecycle (start/stop/restart/pull/update/down), live logs, and
compose/.env editing — all proxied to the agent.
> **Not yet:** remote backup destinations (SFTP/S3) — backups currently download
> to / upload from the browser.
### Phase 6 — Backup destinations
- **Off-box backups**: define **SFTP** or **S3-compatible** (MinIO, Backblaze B2,
AWS S3, …) destinations under **Settings → Backup destinations** (with a Test
button; secrets are masked in API responses).
- **Push & restore**: the stack Backup dialog can push straight to a destination
instead of downloading; the Restore dialog can browse a destination's backups
and restore (volumes included) directly from it. Remote backups can also be
deleted from the UI.
## Deploying an agent on another host
@@ -210,6 +217,16 @@ GET /agent/ping | /system | /stacks | /stacks/{id} | /stacks/{id}/logs
POST /agent/stacks | /stacks/{id}/{action} PUT/DELETE /agent/stacks/{id}
```
### Phase 6 endpoints
```
GET /api/backups/destinations POST /api/backups/destinations
PUT /api/backups/destinations/{id} DELETE /api/backups/destinations/{id}
POST /api/backups/destinations/{id}/test GET /api/backups/destinations/{id}/backups
DELETE /api/backups/destinations/{id}/backups/{name}
POST /api/stacks/{id}/backup/push POST /api/stacks/restore-from
```
## Security notes
- The Docker socket is only ever touched by the backend process; it is never