> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XBOX Connected Storage 工具 (XblConnectedStorage.exe)

> 命令行工具 XblConnectedStorage.exe，可从任何沙盒（包括 RETAIL）下载 XBOX 游戏存档，用于调试难以复现的存档问题。

XBOX Connected Storage 工具用于下载游戏存档。它可以从任何沙盒(包括 RETAIL)下载存档。这在调试难以重现的问题时很有用。

此命令行工具是 Microsoft 游戏开发工具包 (GDK) 和 `XboxLiveTools.zip` 的一部分;请参阅 [XBOX 服务开发工具](/tools/tools-services/live-tools)。它也从版本 2104 起在 GDK 中可用。

XblConnectedStorage.exe 用于下载用户的连接存储数据。使用 XBOX Connected Storage 工具之前,必须使用 [XBOX 服务开发者帐户工具 (XblDevAccount.exe)](/tools/tools-services/live-dev-account-tool) 使用开发者帐户进行登录。

## 用法

可以使用 Connected storage 工具获取一个表示游戏存档的 XML 文件,格式为 [导入和导出文件格式(保密协议主题)](/tools/tools-console/commandlinetools/xbstorage#xbstorage_fileformat)。
XML 文件旨在与 [xbstorage.exe 工具](/tools/tools-console/commandlinetools/xbstorage) 一起使用,该工具可以用于将 XML 文件中的数据导入连接存储空间以供 XBOX Development Kit 使用。该工具会自动处理 gzip 压缩存档的解压缩。

获取游戏存档的 XML 文件有三个要求:

1. 具有 Tools Access 权限的读取权限的开发者帐户。若要了解更多信息,请参阅 \[使用 Connected Storage 工具所需的权限]\[#permissions-needed-to-use-the-tool]]。
2. 游戏的服务配置 ID (SCID)。可以在合作伙伴中心找到。
3. 要拉取其存档的用户的经典 Gamertag。

#### 命令行使用示例。

```
XblConnectedStorage --scid 00000000-0000-0000-0000-0000628cd0f2 --gamertag CrazyGiraffe
```

#### 命令行选项

使用 `--help` 选项可查看工具支持的可用命令行选项的完整列表。

从 2020.6.0.0 版本开始,输出如下:

```shell theme={null}
XblConnectedStorage 2020.6.0.0
Copyright (C) 2021 Microsoft Corporation
USAGE:
Downloads the Connected Storage data for this user to ./output/xbstorage.xml:
XblConnectedStorage --scid 00000000-0000-0000-0000-0000628cd0f2 --gamertag CrazyGiraffe --output ./output/xbstorage.xml
 --sandbox TEST.0

  -c, --scid        Required. The service configuration ID (SCID) of the title

  -s, --sandbox     Required. The target sandbox for title storage

  -g, --gamertag    Required. The legacy gamertag of the player to retrieve storage for

  -o, --output      (Default: ./output/xbstorage.xml) The output file to write the xbstorage xml file to.

  --help            Display this help screen.

  --version         Display version information.
```

### 使用工具所需的权限

保护用户和游戏存档数据的隐私非常重要。开发者帐户需要特定权限才能使用 XBOX Connected Storage 工具访问游戏存档数据。若要查看或修改开发者帐户的这些权限,请按以下步骤操作:

1. 在 Microsoft 合作伙伴中心中打开 [用户管理页面](https://partner.microsoft.com/dashboard/account/v3/usermanagement#users)
2. 选择要查看或修改其权限的用户或组
3. 单击 “Customize Permissions” 链接
4. 选择要查看或修改其权限的产品
5. 选择 “XBOX Live”
6. 选择 “Tools Access”

需要具有 “Tools Access” 读取权限的开发者帐户才能下载该产品的游戏存档。

## 理解错误消息

### 500 Internal Server Error

在尝试访问当前开发者帐户没有访问权限的 SCID/沙盒组合时会发生此错误。有关如何解决此问题的指导,请参阅本文档的 [使用工具所需的权限](#permissions-needed-to-use-the-tool) 部分。


## Related topics

- [XBOX 服务开发工具](/zh-CN/tools/tools-services/live-tools.md)
- [XBOX 服务工具](/zh-CN/tools/tools-services/live-tools-nav.md)
- [Connected Storage](/zh-CN/services/xbox-services/storage/connected-storage/live-connected-storage-nav.md)
- [玩家数据重置工具 (XblPlayerDataReset.exe)](/zh-CN/tools/tools-services/live-player-data-reset.md)
- [Connected Storage 与 Title Storage 对比](/zh-CN/services/xbox-services/storage/live-connected-storage-vs-title-storage.md)
