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

+4 -3
View File
@@ -4,6 +4,7 @@ from fastapi.responses import FileResponse
from sqlalchemy.orm import Session
from database import get_db
from utils.auth import verify_token
from utils.guards import forbid_during_restore
from models import UserProfile
from schemas import UserProfile as UserProfileSchema, UserProfileCreate, UserProfileNoteUpdate
from services import pki, generator
@@ -69,7 +70,7 @@ def list_profiles(db: Session = Depends(get_db)):
return updated_profiles
@router.post("/profiles", response_model=UserProfileSchema)
@router.post("/profiles", response_model=UserProfileSchema, dependencies=[Depends(forbid_during_restore)])
def create_profile(
profile_in: UserProfileCreate,
db: Session = Depends(get_db)
@@ -123,7 +124,7 @@ def create_profile(
db.refresh(new_profile)
return new_profile
@router.put("/profiles/{profile_id}/note", response_model=UserProfileSchema)
@router.put("/profiles/{profile_id}/note", response_model=UserProfileSchema, dependencies=[Depends(forbid_during_restore)])
def update_profile_note(profile_id: int, body: UserProfileNoteUpdate, db: Session = Depends(get_db)):
profile = db.query(UserProfile).filter(UserProfile.id == profile_id).first()
if not profile:
@@ -134,7 +135,7 @@ def update_profile_note(profile_id: int, body: UserProfileNoteUpdate, db: Sessio
db.refresh(profile)
return profile
@router.delete("/profiles/{profile_id}")
@router.delete("/profiles/{profile_id}", dependencies=[Depends(forbid_during_restore)])
def revoke_profile(profile_id: int, db: Session = Depends(get_db)):
profile = db.query(UserProfile).filter(UserProfile.id == profile_id).first()
if not profile: