How to restore a Roam graph (using EDN)

This article describes how to import an entire Roam database (graph) using a .edn backup file. This procedure will wipe the entire graph you import the file in. It’s best used to restore an existing graph into a new (offline) graph.

What is an EDN backup file?

EDN (.edn extension) is an open file format used for data structure. It’s a file format that works with Clojure, the programming language that Roam was created with.

The sentence above is not so important, though. What matters is that EDN files can be read by open source programs, which makes it a safe way to backup your Roam graph.

The main difference with JSON backup files is that EDN backups overwrite your entire database, whereas JSON files only add to your database (not overwriting any data).

How to create an EDN backup file

EDN files can be easily created using the Export All function from the menu (...), either manually or automatically.

Click here to learn how to manually create an EDN file.

Click here to learn how to set up automated backups in Roam.

How to restore an entire graph using an EDN backup file

Warning! The procedure below will erase the entire graph you import the .edn file into.

Step 1: Open settings.
Open the Settings from the top-right menu (...):

Settings option

Step 2: Navigate to restore graph option.
From the settings screen, go to the Graph tab.

Next, click the red button that says Restore this graph:

Restore this graph settings screen

Step 3: Select backup to restore.
Click the Choose File button and select the .edn backup file you wish to restore.

Next, enter the name of your graph (case sensitive). This is an extra security layer to ensure you don’t accidentally overwrite your graph.

Finally, click the button that says I understand the consequences, restore this graph to the backup:

Restore graph file selection and warning

Step 4: Start the restore.
After confirming you want to restore the graph, you’ll see the progress screen.

Click the blue Start button to initiate the restore process:

EDN progress screen start

Step 5: Exit to the restored graph.
Once Roam finishes restoring the EDN file, the green Exit button becomes clickable.

Click it to be taken to your freshly restored graph:

EDN progress screen done

Tags: , ,

Was this helpful?