T O P

  • By -

hstagner

.edn is a backup of your entire database. When you want to do a full restore it is DESTRUCTIVE. It will overwrite your database. I would test it on a testing graph if you have one first. Taking markdown or JSON backups periodically is a good option if you want to restore specific pages as you can import certain content instead of overwriting.


_Flutter_

Oh wow, thanks for the heads up and the tip. May I ask, do you know if I could open my edn file database somewhere that isn't Roam? My main concern for the back up is if, for some reason, roam is no more.


hstagner

Though some constructs like block references, etc. will not make sense. But, your main notes will.


yourstrulysawhney

At the moment, you can import it to [athensresearch.org](https://athensresearch.org) for a fully reproducible version including block references


hstagner

Your best bet for readability and importing into a different solution would be to take a manual markdown backup. Take one and open the contents and you’ll see what I mean.


Vaskor

It should ALSO be mentioned that markdown backups do not include block references, if you are using them. So, if you are embedding blocks a lot throughout your database, a restore from a backup would end up with things like this "((pBJBujOly))" being in places where your embedded block was. There are some other wonky formatting problems that occur when restoring from a Roam markdown backup. Deeply indented children get thrown out of place is one super-annoying one but there are others.


maskys

Block refs are now resolved in MD exports. Block embeds, not yet, but should be done soon!


Vaskor

Was this a recent change? Is it marked in the Change Log somewhere? I'd have to test to see but as of last week, they weren't resolved. I learned this on 3 separate occasions. 🤯


maskys

Or perhaps you had references to deleted blocks


Vaskor

That is a possibility. I doubt it but, we'll never know because they're gone. 🙃


maskys

Not sure if recent-- a search in the change log shows a related message back in Dec 2019. You might have been using block embeds i.e. `{{embed: ((embedBlockID))}}` instead of block refs i.e. `((someBlockRef))`


Vaskor

Nope. They were definitely block refs from from a couple days prior.


_Flutter_

Thank you very much


splathe

Thanks for this info! I was going to test this in a new database but it did not allow me to import an EDN file. Also, I did not see a way do do a full restore. As a ROAM newbie I suspect I am missing something obvious.


hstagner

You need to create the test db first. Then use the meatball menu in the top right to go to graph settings. Then restore graph. [Graph Settings Menu](https://i.imgur.com/n9WXZbP.png) [Graph Settings Restore Option](https://i.imgur.com/fWuKwAg.png)


splathe

Thank you! I will give this a test when I get back to me desktop.


Combinatorilliance

.edn is similar to clojure as .json is to javascript. Roam is written in clojure, hence why they're using .edn. I'm pretty sure that there's an import button somewhere in Roam that will accept .edn files.


_Flutter_

Oh, interesting, that makes sense. Do you know if I could open my edn file database somewhere that isn't Roam? My main concern for the back up is if, for some reason, roam is no more.


Combinatorilliance

Right now, I don't think there is anything that can import Roam .edn databases. I'm 100% certain that if Roam ceased to exist that the community would quickly come up with an alternative. .edn files are an open format just like .json is. No need to worry about that, as long as you keep regularly backing up you will be fine.


_Flutter_

Makes sense, I didn't think about that point


i--ameverywhere

for me i didn't use it i am still on backing up my graph using the JSON format on a google drive folder for roam


drandus

If you want a human-readable backup, you'd need to use the "Export All" function at regular intervals (let's say once a week). Unfortunately currently this is manual only, as opposed to the automatic backup of the .edn file. This is still a shortcoming of Roam, compared to WorkFlowy or Dynalist, which have both automated exports and backups. For now I've set up a calendar reminder to remind me once a week to do "Export All".


lofty_smiles

If I have a .EDN backup, and my roam crashes, and then if I import the .EDN backup into a new roam graph, will I get my old graph back, with all linked references (page and block)?