# Migration Tool

{% hint style="info" %}
For using SQL dumps as safety backups, please see [Backups & Restore](/for-system-administrators/backup.md) instead. The migration tools on this page here should **not** be used for any data backups! Especially files are not part of the backup, but only referenced by URL.\
\
The process on this page is also not intended for PostgreSQL upgrades.
{% endhint %}

This page describes of the **fylr migration tool**, which is an internal part of the **fylr** binary and can be used by calling sub commands from the command line.

The migration consists of two parts: [**backup**](/for-system-administrators/migration/backup.md) and [**restore**](/for-system-administrators/migration/restore.md). A complete migration is done by loading a backup from a source instance (**easydb5** or **fylr**) using the `fylr backup` command, and later restoring it to a target instance (**fylr** only) using the `fylr restore` command.

The migration tools use the API to store JSON files with payloads. The payloads contain basetypes and records stored in a way that the content can be used as the body of POST requests to the API of the target instance.

A central element of each backup is the `manifest.json` file, which contains information about the source instance. It also contains filenames (relative paths) to datamodel and base configuration files, and most important, the list of all payloads in a specific order.

The JSON files in the backup can be used for multiple restore runs, against multiple target instances.

## Requirements

`backup` and `restore` are sub commands of `fylr`. Make sure to always use the latest **fylr** version.

For all following descriptions of commands, `fylr` refers to a local binary.


---

# Agent Instructions: 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.fylr.io/for-system-administrators/migration.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.
