HuggingFace0920 commited on
Commit
5e4fdf4
·
verified ·
1 Parent(s): 231550a

Update sync_data.sh

Browse files
Files changed (1) hide show
  1. sync_data.sh +2 -2
sync_data.sh CHANGED
@@ -68,8 +68,8 @@ def download_latest_backup(token, repo_id, extract_path):
68
  if filepath and os.path.exists(filepath):
69
  try:
70
  with tarfile.open(filepath, 'r:gz') as tar:
71
- # 还原到根目录,确保 /mcp-proxy-server 和 /tools 都能被还原
72
- tar.extractall("/")
73
  print(f"已成功恢复备份: {latest_backup}")
74
  except PermissionError as e:
75
  print(f"解压备份时权限不足: {str(e)},请确保容器有写入根目录的权限。")
 
68
  if filepath and os.path.exists(filepath):
69
  try:
70
  with tarfile.open(filepath, 'r:gz') as tar:
71
+ tar.extractall("/mcp-proxy-server") # 或其它有权限的目录
72
+ tar.extractall("/tools") # 如有需要
73
  print(f"已成功恢复备份: {latest_backup}")
74
  except PermissionError as e:
75
  print(f"解压备份时权限不足: {str(e)},请确保容器有写入根目录的权限。")