mirror of
https://github.com/MengMengCode/CLICD.git
synced 2026-12-05 04:49:20 +08:00
Add offline disk growth and managed data disks, portable full backups and restore, independent clones and batch instance templates, and local ISO and QCOW2 uploads. Persist task details and metric history in SQLite. Replace hand-drawn host and instance charts with shadcn/ui Chart and Recharts, keep numeric values and units together, and preserve responsive layouts, icons, time ranges and full-sample statistics. Validation: backend tests and vet; Linux KVM/LXC/API/config/server tests; frontend and documentation production builds; real disk, reinstall, backup, clone, upload, task-history and NAT tests; 37 cross-host restore checks; responsive chart checks and read-only deployed verification. Guest Windows restore behavior has not been tested on a running Windows VM.
1.2 KiB
1.2 KiB
Snapshot Management
Instances with data disks cannot create/restore existing snapshots or enable scheduled snapshots. Detached disks count too. Disable an active snapshot schedule before adding a data disk. Use full backups for rollback, migration or cloning that includes the system disk and all data disks.
Snapshots save the current state of a container so it can be rolled back before upgrades, configuration changes, or delivery.
Global Overview
GET /api/v1/snapshots
Use this endpoint to view snapshot summaries for all containers.
Container Snapshots
GET /api/v1/containers/{id}/snapshots
POST /api/v1/containers/{id}/snapshots
DELETE /api/v1/containers/{id}/snapshots/{snapshot_id}
POST /api/v1/containers/{id}/snapshots/{snapshot_id}/restore
Restoring a snapshot changes container state. In production, confirm that the current workload can be interrupted first.
Scheduled Snapshots and Quotas
POST /api/v1/containers/{id}/snapshots/schedule
PUT /api/v1/containers/{id}/snapshots/quota
Scheduled snapshots are useful for long-running containers. Quotas prevent snapshots from growing without limit and filling the host disk.