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:
- Memgraph Platform
- Memgraph MAGE
Creating a database dump
To create a dump of your Memgraph Platform database, execute the following command in mgconsole
:
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
If you installed and started Memgraph MAGE using Docker, follow these steps:
- Open a new terminal and check the Docker container ID by running
docker ps
. - Copy the
queries.cypherl
to your Docker container. - Run the following command:
docker exec -i CONTAINER_ID mgconsole < queries.cypherl
For more information about mgconsole
options run:
docker exec -i CONTAINER_ID mgconsole --help
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.
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.