Skip to content

Conversation

@xqvvu
Copy link
Contributor

@xqvvu xqvvu commented Jan 19, 2026

此脚本用于恢复被错误更新为 S3 key 的 fileId/imageId

使用场景:

  • 迁移后 fileId 被改成了 S3 key
  • 但 S3 上的文件丢失了
  • GridFS 数据还在

恢复逻辑:

  1. 遍历所有 fileId 以 "dataset/" 开头的 collection(这些是已迁移但 S3 丢失的)
  2. 从 S3 key 中提取 datasetId 和文件名
  3. 在 GridFS 中查找匹配的文件
  4. 恢复 fileId 为原始的 GridFS ObjectId

@gru-agent
Copy link
Contributor

gru-agent bot commented Jan 19, 2026

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 228d9f9 ✅ Finished

History Assignment

Files

File Pull Request
projects/app/src/pages/api/admin/restorev4143.ts 🔴 Closed #6288

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@github-actions
Copy link

Preview mcp_server Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_228d9f99009cb537205427948e6c9b159fdd44d7

@github-actions
Copy link

Preview sandbox Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_228d9f99009cb537205427948e6c9b159fdd44d7

@github-actions
Copy link

Preview fastgpt Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_228d9f99009cb537205427948e6c9b159fdd44d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant