Spaces:
Running
Running
Claude commited on
Commit ·
e27fcc9
1
Parent(s): 821f5fc
fix: restore priority HF Dataset first, WebDAV fallback
Browse files- backup-manager.py +9 -9
backup-manager.py
CHANGED
|
@@ -347,20 +347,20 @@ class BackupManager:
|
|
| 347 |
|
| 348 |
# G2.4: 恢复
|
| 349 |
def restore(self) -> bool:
|
| 350 |
-
"""恢复备份 - 优先
|
| 351 |
print("[Backup] Starting restore...")
|
| 352 |
-
|
| 353 |
-
#
|
| 354 |
-
if self.webdav:
|
| 355 |
-
print("[Backup] Trying WebDAV restore...")
|
| 356 |
-
if self._restore_from_webdav():
|
| 357 |
-
return True
|
| 358 |
-
|
| 359 |
-
# Fallback 到 HF Dataset
|
| 360 |
if self.hf_api and self.hf_repo:
|
| 361 |
print("[Backup] Trying HF Dataset restore...")
|
| 362 |
if self._restore_from_hf():
|
| 363 |
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
|
| 365 |
print("[Backup] No backup found to restore")
|
| 366 |
return False
|
|
|
|
| 347 |
|
| 348 |
# G2.4: 恢复
|
| 349 |
def restore(self) -> bool:
|
| 350 |
+
"""恢复备份 - 优先HF Dataset,fallback WebDAV"""
|
| 351 |
print("[Backup] Starting restore...")
|
| 352 |
+
|
| 353 |
+
# 优先从 HF Dataset 恢复
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
if self.hf_api and self.hf_repo:
|
| 355 |
print("[Backup] Trying HF Dataset restore...")
|
| 356 |
if self._restore_from_hf():
|
| 357 |
return True
|
| 358 |
+
|
| 359 |
+
# Fallback 到 WebDAV
|
| 360 |
+
if self.webdav:
|
| 361 |
+
print("[Backup] Trying WebDAV restore...")
|
| 362 |
+
if self._restore_from_webdav():
|
| 363 |
+
return True
|
| 364 |
|
| 365 |
print("[Backup] No backup found to restore")
|
| 366 |
return False
|