4e3a4b4602
带 Web 操作界面的备份系统,支持: - 数据源:MySQL 数据库(mysqldump)、服务器目录(tar.gz) - 存储目标:本地目录、S3 兼容对象存储(MinIO/Ceph/AWS S3) - 触发方式:手动 + Cron 定时调度(APScheduler) - 备份还原:MySQL 库、目录 - JWT 登录认证 + Fernet 字段加密 - 保留策略:按数量 + 按天数双重清理 技术栈:FastAPI + SQLAlchemy 2 + APScheduler + aioboto3; 前端 Vite + React 18 + TypeScript + Ant Design 5 + Zustand。 Docker Compose 一键起。 Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
646 B
Python
33 lines
646 B
Python
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
from app.schemas.job import RunSummary
|
|
|
|
|
|
class RunOut(RunSummary):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
job_id: int
|
|
artifact_path: Optional[str]
|
|
artifact_checksum: Optional[str]
|
|
log_excerpt: Optional[str]
|
|
created_at: datetime
|
|
|
|
|
|
class RunLogOut(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
id: int
|
|
content: str
|
|
created_at: datetime
|
|
|
|
|
|
class RunListResponse(BaseModel):
|
|
total: int
|
|
items: list[RunOut]
|
|
|
|
|
|
class RunTriggerResponse(BaseModel):
|
|
run_id: int
|
|
status: str
|