> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/set-up-the-agent/migrate-a-legacy-configuration.md).

# Migrate a legacy configuration

Use this page when you are already on **ABAP Agent 2.0** (or installing a newer 2.0 build) and your `config.toml` is below **configuration schema version 4**.

{% hint style="warning" %}
**This is not the 1.3 → 2.0 product migration.** `setup migrate` upgrades the **2.0+ configuration schema** only. If you are moving from ABAP Agent 1.3 or earlier to 2.0, see [Compatibility with earlier ABAP Agent versions](/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/upgrading-abap-agent-version.md#compatibility-with-earlier-abap-agent-versions).
{% endhint %}

The current agent requires **configuration version 4**. Any command you run against a config below version 4 will fail with an error like:

```
[error] Config version 0 is not supported (minimum: 4). Run the `slabapcli setup migrate` command to migrate your config.
```

The migration automatically applies all necessary steps to bring the configuration to version 4.

Follow the steps below to migrate your configuration before continuing with the agent setup.

{% hint style="warning" %}
**Before you migrate:** Back up your `config\config.toml` file. The migration modifies the file in place and cannot be undone automatically.
{% endhint %}

## Run the migration

{% hint style="warning" %}
**End and disable all SeaLights scheduled tasks** in the Windows Task Scheduler before running the migration. The migration will warn you to do this — make sure they are stopped before you confirm.
{% endhint %}

Run the following from your terminal:

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe setup migrate
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe setup migrate
```

{% endcode %}
{% endtab %}
{% endtabs %}

Use the `--yes` / `-y` flag to skip the interactive confirmation prompt:

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe setup migrate --yes
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe setup migrate --yes
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe setup migrate
[2026-03-08 13:43:42.193+02:00] [info] Detected Windows version: Windows 11
[2026-03-08 13:43:42.195+02:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
[2026-03-08 13:43:42.205+02:00] [info] Config version 0 detected. Migration to version 4 is required.
[2026-03-08 13:43:42.205+02:00] [warning] Please make sure to End and then Disable all Sealights scheduled tasks in the Windows Task Scheduler.
Continue? [Y/n]
```

{% endcode %}

* Enter `Y` (or press **Enter**) to proceed with the migration.
* Enter `n` to cancel. The config file will not be changed.

When you confirm, the migration runs and writes the updated file:

{% code title="Expected output — continued (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
[info] Applying v0 -> v1 migration: setting version and populating pipeline appname fields
[info] Config successfully migrated to version 1.
[info] Applying v1 -> v2 migration: adding mandatory footprints typequeries
[info] Config successfully migrated to version 2.
[info] Applying v2 -> v3 migration: adding server and adapters configuration
[info] Config successfully migrated to version 3.
[info] Applying v3 -> v4 migration: adding cachedprdrfc to RFC entries
[info] Config successfully migrated to version 4.
[info] Config migrated and written to 'C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml'
```

{% endcode %}

## What the migration does

The migration applies the following steps in sequence. If your config is already at an intermediate version, only the remaining steps are applied.

These steps describe **schema evolution within ABAP Agent 2.0 configuration**, not a product upgrade from ABAP Agent 1.3.

### v0 to v1

| Change              | Details                                                                                         |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| Sets config version | Adds `version = 1` to the root of `config.toml`                                                 |
| Backfills `appname` | Populates the `appname` field for each existing pipeline, derived from the legacy pipeline name |
| Backfills `labid`   | Populates any missing `labid` fields                                                            |

### v1 to v2

| Change              | Details                                                                                     |
| ------------------- | ------------------------------------------------------------------------------------------- |
| Sets config version | Updates `version` to `2`                                                                    |
| Adds `typequeries`  | Adds an empty `typequeries = []` array to the `[footprints]` section if not already present |

### v2 to v3

| Change              | Details                                                                         |
| ------------------- | ------------------------------------------------------------------------------- |
| Sets config version | Updates `version` to `3`                                                        |
| Adds `[server]`     | Adds the default `[server]` section (HTTP server, port 17500)                   |
| Adds `[adapters]`   | Adds the default `[adapters]` section for test-repository adapter configuration |

### v3 to v4

| Change              | Details                                                                                 |
| ------------------- | --------------------------------------------------------------------------------------- |
| Sets config version | Updates `version` to `4`                                                                |
| Adds `cachedprdrfc` | Adds the `cachedprdrfc` field to each `[[rfc]]` entry to support production RFC caching |

## Re-enable scheduled tasks

After migration, re-enable your scheduled tasks in the Windows Task Scheduler. Then run `setup upgrade` to have the CLI re-register and enable the scheduled tasks automatically:

{% tabs %}
{% tab title="Command Prompt" %}
{% code title="Command" overflow="wrap" %}

```batch
slabapcli.exe setup upgrade
```

{% endcode %}
{% endtab %}

{% tab title="PowerShell" %}
{% code title="Command" overflow="wrap" %}

```powershell
.\slabapcli.exe setup upgrade
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="Expected output (PowerShell)" overflow="wrap" lineNumbers="true" %}

```log
.\slabapcli.exe setup upgrade
[2026-03-08 13:44:15.012+02:00] [info] Detected Windows version: Windows 11
[2026-03-08 13:44:15.014+02:00] [info] Config pathname: C:\ProgramData\Tricentis\SeaLights\ABAP Agent\config\config.toml
[2026-03-08 13:44:15.025+02:00] [info] Re-enabling scheduled tasks...
[2026-03-08 13:44:15.031+02:00] [info] Scheduled tasks re-enabled.
[2026-03-08 13:44:15.031+02:00] [info] Total time: 00:00:00.019
```

{% endcode %}

## After migration

If you run `setup migrate` on a config that is already at the current version, the command exits safely with no changes:

```
[info] Config already at version 4.
```

{% hint style="info" %}
The installer also runs `slabapcli setup migrate --yes` and `slabapcli setup upgrade` automatically during installation and upgrades of ABAP Agent 2.0. Manual migration is only needed if you are upgrading 2.0 binaries without using the installer.
{% 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, and the optional `goal` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/sealights-agents-and-plugins/abap-agent-2.0/command-line-interface/set-up-the-agent/migrate-a-legacy-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
