mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
feat: 数据库迁移前自动备份 (#6360)
This commit is contained in:
@@ -194,6 +194,8 @@ class ConfigModel(BaseModel):
|
||||
DB_BACKUP_ENABLE: bool = False
|
||||
# 定时备份的 Cron 表达式,留空时不注册定时任务
|
||||
DB_BACKUP_CRON: str = "0 3 * * *"
|
||||
# 检测到现有数据库需要迁移时,在结构变更前创建恢复点
|
||||
DB_BACKUP_ON_UPGRADE: bool = True
|
||||
# 备份根目录;未配置时使用 CONFIG_PATH/database_backup
|
||||
DB_BACKUP_PATH: Optional[str] = None
|
||||
# 本地备份的保留天数,0 表示不按时间清理
|
||||
|
||||
Reference in New Issue
Block a user