mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-30 02:14:43 +08:00
feat(backup): add pre-migration backup, periodic backup, backfill warning, and backup management UI
Four improvements to the database backup mechanism: 1. Auto backup before schema migration - creates a snapshot when upgrading from an older database version, providing a safety net beyond the existing SAVEPOINT rollback mechanism. 2. Periodic startup backup - checks on app launch whether the latest backup is older than 24 hours and creates a new one if needed, ensuring all users have recent backups regardless of usage patterns. 3. Backfill failure notification - switch now returns SwitchResult with warnings instead of silently ignoring backfill errors, so users are informed when their manual config changes may not have been saved. 4. Backup management UI - new BackupListSection in Settings > Data Management showing all backup snapshots with restore capability, including a confirmation dialog and automatic safety backup before restore.
This commit is contained in:
@@ -174,7 +174,8 @@
|
||||
"openclawModelsRegistered": "Models have been registered to /model list",
|
||||
"openclawDefaultModelSet": "Set as default model",
|
||||
"openclawDefaultModelSetFailed": "Failed to set default model",
|
||||
"openclawNoModels": "No models configured"
|
||||
"openclawNoModels": "No models configured",
|
||||
"backfillWarning": "Switched successfully, but failed to save changes back to the previous provider"
|
||||
},
|
||||
"confirm": {
|
||||
"deleteProvider": "Delete Provider",
|
||||
@@ -295,6 +296,18 @@
|
||||
"selectFileFailed": "Please choose a valid SQL backup file",
|
||||
"configCorrupted": "SQL file may be corrupted or invalid",
|
||||
"backupId": "Backup ID",
|
||||
"backupManager": {
|
||||
"title": "Database Backups",
|
||||
"description": "Automatic database snapshots for restoring to a previous state",
|
||||
"empty": "No backups yet",
|
||||
"restore": "Restore",
|
||||
"restoring": "Restoring...",
|
||||
"confirmTitle": "Confirm Restore",
|
||||
"confirmMessage": "Restoring this backup will overwrite the current database. A safety backup will be created first.",
|
||||
"restoreSuccess": "Restore successful! Safety backup created",
|
||||
"restoreFailed": "Restore failed",
|
||||
"safetyBackupId": "Safety Backup ID"
|
||||
},
|
||||
"webdavSync": {
|
||||
"title": "WebDAV Cloud Sync",
|
||||
"description": "Sync database and skill configurations across devices via WebDAV.",
|
||||
|
||||
@@ -174,7 +174,8 @@
|
||||
"openclawModelsRegistered": "モデルが /model リストに登録されました",
|
||||
"openclawDefaultModelSet": "デフォルトモデルに設定しました",
|
||||
"openclawDefaultModelSetFailed": "デフォルトモデルの設定に失敗しました",
|
||||
"openclawNoModels": "モデルが設定されていません"
|
||||
"openclawNoModels": "モデルが設定されていません",
|
||||
"backfillWarning": "切り替え成功しましたが、前のプロバイダーへの設定保存に失敗しました"
|
||||
},
|
||||
"confirm": {
|
||||
"deleteProvider": "プロバイダーを削除",
|
||||
@@ -295,6 +296,18 @@
|
||||
"selectFileFailed": "有効な SQL バックアップファイルを選択してください",
|
||||
"configCorrupted": "SQL ファイルが壊れているか形式が無効な可能性があります",
|
||||
"backupId": "バックアップ ID",
|
||||
"backupManager": {
|
||||
"title": "データベースバックアップ",
|
||||
"description": "以前の状態に復元するための自動データベーススナップショット",
|
||||
"empty": "バックアップはまだありません",
|
||||
"restore": "復元",
|
||||
"restoring": "復元中...",
|
||||
"confirmTitle": "バックアップの復元を確認",
|
||||
"confirmMessage": "このバックアップを復元すると現在のデータベースが上書きされます。安全バックアップが先に作成されます。",
|
||||
"restoreSuccess": "復元成功!安全バックアップが作成されました",
|
||||
"restoreFailed": "復元に失敗しました",
|
||||
"safetyBackupId": "安全バックアップID"
|
||||
},
|
||||
"webdavSync": {
|
||||
"title": "WebDAV クラウド同期",
|
||||
"description": "WebDAV を使ってデバイス間でデータベースとスキル設定を同期します。",
|
||||
|
||||
@@ -174,7 +174,8 @@
|
||||
"openclawModelsRegistered": "模型已注册到 /model 列表",
|
||||
"openclawDefaultModelSet": "已设为默认模型",
|
||||
"openclawDefaultModelSetFailed": "设置默认模型失败",
|
||||
"openclawNoModels": "该供应商没有配置模型"
|
||||
"openclawNoModels": "该供应商没有配置模型",
|
||||
"backfillWarning": "切换成功,但旧供应商配置回填失败,您手动修改的配置可能未保存"
|
||||
},
|
||||
"confirm": {
|
||||
"deleteProvider": "删除供应商",
|
||||
@@ -295,6 +296,18 @@
|
||||
"selectFileFailed": "请选择有效的 SQL 备份文件",
|
||||
"configCorrupted": "SQL 文件可能已损坏或格式不正确",
|
||||
"backupId": "备份ID",
|
||||
"backupManager": {
|
||||
"title": "数据库备份",
|
||||
"description": "自动备份的数据库快照,可用于恢复到之前的状态",
|
||||
"empty": "暂无备份",
|
||||
"restore": "恢复",
|
||||
"restoring": "恢复中...",
|
||||
"confirmTitle": "确认恢复备份",
|
||||
"confirmMessage": "恢复到此备份将覆盖当前数据库。恢复前会自动创建安全备份。",
|
||||
"restoreSuccess": "恢复成功!安全备份已创建",
|
||||
"restoreFailed": "恢复失败",
|
||||
"safetyBackupId": "安全备份ID"
|
||||
},
|
||||
"webdavSync": {
|
||||
"title": "WebDAV 云同步",
|
||||
"description": "通过 WebDAV 在多设备间同步数据库和技能配置。",
|
||||
|
||||
Reference in New Issue
Block a user