If you need to manage
XGameSave data on PC, you must use the
xgamesaveutil.exe command-line tool.xbstorage reset
Erases all local data in XGameSave storage on the local console, restoring it to factory settings. Data persisted to the cloud isn’t modified and is downloaded again, if necessary.xbstorage import
Imports the data that’s specified in filename to a XGameSave storage space. This XML file contains the data. For an example, see xbstorage generate in this topic. For more information about the file’s XML format, see Import and export file format in this topic. There are two ways to specify anXGameSave storage space.
-
If the input file has a ContextDescription section that’s populated correctly, that information is used to specify the
XGameSavestorage space. - You can also partially or fully specify the storage space by using command-line parameters. These parameters take precedence over the corresponding elements in the input file.
XGameSave storage space with the cloud by using the same logic that runs when a running app acquires an XGameSave storage space.
After the import completes, the console begins uploading the imported data to the cloud in the background. The upload finishes before the cloud lock is released. The behavior differs from the PC tool (xgamesaveutil), which writes data to local storage only and does not trigger an upload to the cloud. For more information, see Manage XGameSave data on PC (xgamesaveutil.exe).
If an app with the same primary service configuration identifier (SCID) is running, this operation could cause a race condition and put the contents of the XGameSave storage space in an indeterminate state.
If /replace isn’t specified, the containers that are specified in the input file are erased before the blobs that are specified in the input file are written. Containers in the XGameSave storage space that aren’t specified in the input file won’t be touched.
xbstorage export
Exports data from anXGameSave storage space to the file specified by outfile. The XML file contains the exported data. For an example, see xbstorage generate in this article. For more information about the XML format, see Import and export file format.
There are two ways to specify the XGameSave storage space.
-
If the /context parameter is used and the file name that’s specified by <infile> has a ContextDescription section that’s populated correctly, that file is used to specify the
XGameSavestorage space. - You can also partially or fully specify the storage space by using command-line parameters. These parameters take precedence over the corresponding elements specified by /context.
XGameSave storage space with the cloud by using the same logic that runs when a running app acquires an XGameSave storage space.
If an app with the same primary SCID is running, this operation could cause a race condition and put the contents of the XGameSave storage space in an indeterminate state.
xbstorage delete
Deletes all data from anXGameSave storage space. There are two ways to specify the XGameSave storage space.
-
If you use the /context parameter and the file specified by <input-file> has a ContextDescription section that’s populated correctly, that file is used to specify the
XGameSavestorage space. - You can also partially or fully specify the storage space by using command-line parameters. These parameters take precedence over the corresponding elements specified by /context.
XGameSave storage space with the cloud by using the same logic that runs when a running app acquires an XGameSave storage space.
If an app with the same primary SCID is running, this operation could cause a race condition and put the contents of the XGameSave storage space in an indeterminate state.
xbstorage generate
Generates dummy data and saves it to the file specified by <file-name>. For more information about the XML format, see Import and export file format. The SCID is set to 00000000-0000-0000-0000-000000000000, and the account is set for a per-machineXGameSave storage space. To change those values, edit the file directly after generation.
Use the following examples.
XGameSave storage space, change the Account node in the XML file as shown in the following example.
xbstorage simulate
Simulates out-of-local-storage conditions for theXGameSave storage service.
Common options
Import and export file format
The XML file used with the import, export, and generate commands has the format shown in the following example.XGameSave storage space for a user, you can use <Account msa="user@example.com"/> instead of <Account machine="true"/>. Otherwise, you can specify the context on the command line for import.
Blobs and containers should have the corresponding names given to them by the game or app for which the file is being generated.
The contents of each blob should be a string wrapped in a CDATA tag, which is generated by calling CryptBinaryToStringW with the flag CRYPT_STRING_BASE64, providing the data for that blob as a raw-byte array. Conversely, blob data can be converted back by calling CryptStringToBinary to provide the formerly encrypted string. For an example of using these two functions, see CryptBinaryToString returns invalid bytes.
