1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

feat(vmbackups): the backups app and its records

A new app holds VM backups: a backup target (a storage pool on each
compute that sees it, its UUID kept to refuse a replaced pool), the
backups (kept with the VM's name and UUID when the VM row goes) and their
files. Claim keys for a target and a backup. Nothing uses them yet.

Installs with their own settings.py add "vmbackups" to INSTALLED_APPS.
This commit is contained in:
catborise 2026-11-17 07:30:37 +03:00
parent a03f12aa5b
commit c7d6f90823
10 changed files with 229 additions and 0 deletions

View file

@ -79,6 +79,15 @@ def quota_key(user_id):
return f"quota:user:{user_id}"
def backup_target_key(target_id):
"""A backup target: one copy into or out of it at a time."""
return f"backup_target:{target_id}"
def backup_key(uuid):
return f"backup:{uuid}"
@cache
def _node():
"""The installation's id (worker.host_identity): the same after a container