# Migrate from Memgraph Platform to Memgraph MAGE

Memgraph Platform was deployed as a single Docker image until version 2.15.
Starting with version 2.15, the platform has transitioned to a multi-container
application. This upgrade separates the previous single Docker image into
individual containers for Memgraph+MAGE and Memgraph Lab.

If you are running an older version of Memgraph Platform (versions up to 2.15),
you can migrate your data to the newer version of Memgraph MAGE.

## Using a database dump

Dumping the database in Memgraph creates a comprehensive record of the database
state, encapsulating nodes, relationships, indexes, constraints, and triggers in
Cypher queries. In this scenario, we are having two Memgraph instances:

1. Memgraph Platform
2. Memgraph MAGE

### Creating a database dump

To create a dump of your Memgraph Platform database, execute the following command in `mgconsole`:

```cypher
DUMP DATABASE;
```

This command will generate a series of Cypher queries that represent the current
state of the database. These queries can be used to recreate the database in its
dumped state. Copy this file to the location that will be accessible to the
Memgraph MAGE instance.

### Importing a database dump

**Docker 🐳**

If you installed and started Memgraph MAGE using **Docker**, follow these steps:

    1. Open a new terminal and check the Docker container ID by running `docker ps`.
    2. Copy the `queries.cypherl` [to your Docker container](https://memgraph.com/docs/getting-started/first-steps-with-docker#copy-files-to-a-docker-container). 
    3. Run the following command:
    
```
docker exec -i CONTAINER_ID cat file.cypherl | mgconsole
```

    For more information about `mgconsole` options run:

```
docker exec -i CONTAINER_ID mgconsole --help
```

**Linux**

Once Memgraph MAGE is running in **Linux**, Cypher queries are imported by running
    [mgconsole](https://memgraph.com/docs/getting-started/cli) in a non-interactive mode and importing data
    saved in a CYPHERL file.

    You can import queries saved in e.g. `queries.cypherl` by issuing the following
    shell command:

```plaintext
cat file.cypherl | mgconsole
```

    For more information about `mgconsole` options run:

  ```
  mgconsole --help
```

> **Note**
>
> You can also use Memgraph Lab for exporting and importing .cypherl file. On the
> Memgraph Platform instance, run the Memgraph Lab and navigate to the `Export`
> section. You can export the database dump to a file with a `.cypherl` extension.
> Access the Memgraph MAGE instance using the Memgraph Lab desktop application and
> navigate to the `Import` section. Use the `.cypherl` dump to import the database
> state into the Memgraph MAGE instance.

For more details on using .cypherl, look at documentation on [working with
.cypherl files](https://memgraph.com/docs/data-migration/cypherl).

## Memgraph's office hours

Schedule a 30 min session with one of our engineers to discuss how Memgraph fits
with your architecture. Our engineers are highly experienced in helping
companies of all sizes to integrate and get the most out of Memgraph in their
projects. Talk to us about data modeling, optimizing queries, defining
infrastructure requirements or migrating from your existing graph database. No
nonsense or sales pitch, just tech.

![](https://memgraph.com/docs/pages/getting-started/memgraph-office-hours.svg)

- [Book a call](https://memgraph.com/office-hours)
