Backup and Restore: packages, Local/S3/SFTP/FTP destinations, UI and API

Encrypted packages (databases, PKI, client profiles) with safe restore and
a pre-restore safety copy, usable for server-to-server migration across
container and system-service installs. New Management page, ovp_backups
volume, migrations code in the profiler image, server name in package names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 09:38:09 +03:00
1 parent d29c261347
commit f8cdcd0fc6
55 files changed
+4401 -37

No files matched your search

+15
View File
@@ -144,6 +144,19 @@ def is_init_running() -> bool:
with _init_lock:
return _init_job["state"] == "running"
# A backup restore replaces the PKI, the profile files and the databases: while it runs,
# everything that changes them is refused (set by services/backup/engine.py)
_restore_running = False
def set_restore_running(value: bool):
global _restore_running
_restore_running = bool(value)
def is_restore_running() -> bool:
return _restore_running
RESTORE_RUNNING_MSG = "A backup restore is running"
class PkiNotReady(Exception):
"""An operation needs keys that are not there (PKI absent, init running or server files missing)."""
@@ -243,6 +256,8 @@ def start_init_async(db: Session):
with _init_lock:
if _init_job["state"] == "running":
raise InitConflict("PKI initialization is already running")
if is_restore_running():
raise InitConflict(RESTORE_RUNNING_MSG)
if is_initialized():
raise InitConflict("PKI is already initialized")
# Here the PKI is absent, has no CA, or carries the marker of an interrupted run: