Export Update Set to XML
export_update_setExport a ServiceNow update set to a local XML file for backup, transfer, or inspection, including complete, batch-base, or retrieved sets while validating records before writing.
Instructions
Export an update set to an XML file on this machine, as the platform's Export to XML does: a Complete local set, a batch base with its Complete children, or a Retrieved (Loaded) update set. The file is checked against the set's records before it is written, and a local export's temporary copy on the instance is removed and read back. The XML holds every record's full payload: it is written to the file only (mode 0600), never returned. Only export from a customer instance with the user's say-so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | Absolute path of the .xml file to write, e.g. /work/exports/my_set.xml (inside NEX_EXPORT_DIR when the server sets one). | |
| sys_id | Yes | sys_id of a sys_update_set, or of a Retrieved Update Set (sys_remote_update_set). | |
| replace | No | Replace the output file if it exists. Only when the user asked to, and only inside NEX_EXPORT_DIR. | |
| instance | No | The ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| include_incomplete | No | Export a set that is not Complete, as a snapshot of unfinished work. Only when the user asked for one. |