`Feature`: Add ProxSnap alike functions to the web interface
General
I'd really like to see a snapshot cleanup management in PegaProx, which shows the oldest snapshots in a cluster (not on a VM/guest level, which requires an admin to click through all objects). This allows a quick identification of old and maybe forgotten snapshots that might get deleted safely. It should also provide a filter mechanism to only display snapshots that are older than a specific date (e.g., 2024-12-30).
Tasks
For the overview, it should provide a new API endpoint which allows post actions to provide a specific date for validate against a cutoff-date. While there's already a snapshot path, it doesn't make sense to re-use that one, because it's only in a VM scope, but it can be called from an outer function. The same should be done for the deletion part. While we're talking about a global cluster aware snapshot functionality, it might make sense to scope it directly to /api/snapshots/[...]
- Create an API endpoint
/api/snapshots/overview- Allow
POSTincluding a date - Filter for snapshot objects older than the given date
- List objects (vmid, vm name, vm type, node, snapshot name, snapshot date, snapsnot age)
- Provide option to delete snapshots from UI
- Allow
- Create an API endpoint
/api/snapshots/delete- Delete (a) given snapshot(s) by invoking
mgr.delete_snapshot
- Delete (a) given snapshot(s) by invoking
Ideas
This is pretty similar to the idea of my ProxSnap tool for Proxmox based clusters, which is currently only available as a cli tool in Rust.
I already adjusted the front/backend and will provide the PR asap. It currently looks like this - happy about feedback.
Hi @gyptazy , I can't currently add new features without checking with @MrMasterbay first, and he's currently unavailable for health reasons. In the meantime, feel free to submit your pull request – we'll review it as soon as possible.
Regards, Marcus
Hey @mkellermann97,
sure, take your time. I've linked the PR in #14. @MrMasterbay, get well soon!
Cheers, gyptazy
Hi @gyptazy ,
We've now integrated your ProxSnap into our new version v0.6.2. Thank you so much for your contribution!
Please let us know if everything looks good to you. Regards, Marcus
Hey Marcus (@mkellermann97),
looks great. Did you already push it? Couldn't find any new sources in branches or similar.
Cheers, gyptazy
Hi @gyptazy, We'll implement this once we've fixed the current bugs and included the other feature requests.
We're aiming to have it done by tomorrow and release it in the afternoon.
Regards, Marcus
Hi @gyptazy , Please check out the latest version and let us know what you think. Regards, Marcus
Hey @mkellermann97,
looks awesome and works perfectly - also thanks for the minor adjustments to it and the crediting!
Cheers, gyptazy