> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell/devolutions-gateway-powershell/legacy-recording-server-migration-tool.md).

# Legacy recording server migration tool

This PowerShell script transforms session recording files from the legacy Devolutions recording server to the Devolutions Gateway session recording format, allowing you to migrate without losing previous recordings. Once the files have been converted to the new format, they will need to be re-indexed from Devolutions Server so that they can be found in their new location for playback from Devolutions Gateway.

Re-indexing enables the detection of records present on the Devolutions Gateway side, making it possible to manually transfer the files and then re-index. However, it is not possible to simply drag and drop the files into the folder; a specific format needs to be adhered to.

Download the [MigrateRecordings.ps1](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/legacy-recording/MigrateRecordings.ps1) and run it from an elevated PowerShell terminal with the legacy recording output path as a parameter:

```powershell
PS > .\MigrateRecordings.ps1 -LegacyPath "C:\inetpub\recording\output"
Migrating recordings to 'C:\ProgramData\Devolutions\Gateway\recordings'
Migrating 7e05bf2d-c97b-44eb-b256-351b3e2ef1f0 (075503d9-d016-496e-b0aa-cab8b020ce2d)
Migrating 2115ab16-308c-4eb4-a871-73bc8fd69022 (0f366b0e-e09d-4f57-b290-779f46fb68fd)
Migrating 479930c5-705a-4051-9edf-bdc2748452a4 (39a7d0ec-339e-4086-8d73-fbf455e1038a)
Migrating 2e3d219b-48a3-432a-b214-f11b8ddaa32e (b3409164-078b-4013-b4f6-9a4663d3df98)
```

If Devolutions Gateway is configured to use a non-default location, the `-RecordingsPath` can be used to override the default destination path. You can also perform the migration on one machine to manually copy the files over to the Devolutions Gateway recordings path on a different machine.

{% hint style="info" %}
A [sample legacy.zip file](https://github.com/Devolutions/devolutions-gateway/blob/master/tools/legacy-recording/legacy.zip) containing legacy recordings is available for reference and testing this script.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/powershell/devolutions-gateway-powershell/legacy-recording-server-migration-tool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
