Best practices for migrating from Roam?

Hi there,

this springs from a thread over on the MPU forum - apologies for cross-posting, but I thought this might actually be more appropriate here…

I am trying to migrate from Roam to Obsidian for a variety of reasons (<.rant> … </.rant>), and I have some (not insurmountable) difficulties doing so.

Some are about cleaning up the files/data, and some are about use cases or functionalities, and I would much appreciate any help and check in with other former Roam users about how they transitioned.

so far I have isolated these issues:

  • Indentation: if you have a lot of indented blocks (think 1.1.2.1), you will either want to unindent them in Roam and then replicate the indentation in OB or just be happy without indentation (or find some clever way to translate multilevel indentation to OB markdown. Anyone know this, let me know, pretty please!) Note: just had a look, and some notes are absolutely fine, while others are not, go figure

  • in page view mode (some worked, some did not):
    image

  • in edit mode:
    image

  • file/note names: if you have a lot of notes with names such as “topic/sub-topic” you will want to rename them to something like “topic-subtopic” as other wise you will have a folder called “topic” and within it a file/note called “sub-topic” (unfortunate if you have things like “course1/week1” “course2/week1”)

  • block embeds: tricky, and don’t work without some manipulation. I haven’t found a solution, my guess is to do a query on ‘embed’ and then change all block embeds to ‘replace with text’ or ‘text with alias’, which would at least give you a way to find the page it originally came from to re-create the embed. perhaps mark as quote?

  • tags: replace with [[ ]] via markdown importer or leave as tags, and just use the files that Roam created (belt and suspenders, potentially very messy…)

  • attributes: no idea. I’m thinking it could be helpful to turn these into pages via double-bracketing them, so that you could find, via the backlink pane, all ‘author’ notes (for example). I have not tested this, any help appreciated.

  • italicised page names: I have a lot of those for film/book/etc titles. they don’t work. unitalicise before export and try not to feel too bad for using the wrong formatting :wink:

  • fuzzy date creation via Roam42: again, no idea - anyone?

  • templates via Roam42: use the builtin templates function of Obsidian! yay!

  • iOS integration: that’s a whole other conversation…

  • export: this is not migration specific, but how do I get my text into Word without all the [[ ]] etc? Word is still THE text editor for my industry (higher ed in the humanities)

if anyone has solutions or further migration issues that I should be aware of, please let me know. any automations for clean-up would be greatly appreciated - I think there was a Keyboard Maestro script floating around by @MacSparky (apologies for tagging you here, too)

I’m currently just using a testing vault but would love to migrate permanently.

2 Likes

I think you’ve found most of the existing solutions, sadly: effort. When I imported from Roam (and I was lucky to not have a lot of items) I had to find and replace a lot of things, especially indentation and bullet-items.

For what it’s worth, BBEdit may be your best friend. It has incredible find and replace capabilities that operate over e.g., a specific selection of plain text files, or all open text files, etc. Try the free trial. It may be all you need!

If you mean natural language dates, I believe @argentum already has a plugin based on the new and shiny API for this: https://github.com/argenos/nldates-obsidian

NotePlan 3 or 1Writer are your best options here, in my opinion.

This is tough for now, though I think we’ll see some export plugins very soon. Until then I export to iA Writer, clean up the brackets, and go from there.

Also, not migration-related, but see Using (and automating) Obsidian on macOS - Meta Post.

6 Likes

Wah! Effort! :wink:

But seriously, thanks for your reply. I’ll check out BBEdit, though I’m loathe to have to learn another app…it might be quicker to just fix up the notes by hand (there aren’t that many important ones yet, thank goodness). What I don’t understand is why some bullets work perfectly and others turn into code blocks and I can’t see any difference in the edit view. I may change back to the standard theme to see if there is anything to see there.

I did mean natural language, so I will check out that link as well.

I didn’t realise you could already access Noteplan 3 - that sounds pretty ideal, especially in terms of also managing ToDos. I’m assuming I could write ToDos in Obsidian and they will show up in Noteplan where they can have reminders etc? That would be awesome!

I love the automation thread, but a lot of it is beyond me, even @MacSparky’s super-easy KM clean up script…I have signed up for his KM Fieldguide, so hopefully in the future this will help.

1 Like

This has to be indent → code. I imagine some of these lines are one indent greater than they “should” be. Play with that to see if they stop being code.

3 Likes

I am going through a similar process and have found this tool incredibly useful:

It quickly removes bullets and namespaces before importing to Obsidian.

5 Likes

In theory this is great, but I really want to avoid putting all my private info through another website. Also, that’s a lot of copying and pasting :wink:

Running it through Zettlr might work (haven’t tried it) and somewhere there was a Macsparky clean—up script for Keyboard Maestro

@Kabo The site uses your browser’s localStorage so everything is stored and processed locally on your computer. The site itself is just a webapp.

I’m going through the migration from Roam to Obsidian myself. For my “Daily Notes”, I’m trying to find a way to change the date creation of the file to match the actual name of the .md file to be able to sort all my old daily notes by date created. Any tips or tricks to this?

Side note: I’m a bit nervous & hoping my github export of markdown files contains everything lol.

No worries there, the issue is less that it is there but how it is there. Roam sadly developed a proprietary version of MD and linking that is utterly useless when getting text out again. Another reason for leaving I guess. Since the json export (which in theory could contain the valuable creation and modification dates) is a big pile of useless crap for anything else but importing things back into Roam, date conversion seems to be the only way.
Up until now, I didn’t find a good way to batch-change the very opinionated date style to something useful, but I’ll report back if I succeed. as of now, I am happy with having the information searchable, the headers can be adapted whenever at a later point.
Biggest information loss occurs when you used embeds and transclusions heavily. These are completely proprietary and do not export in any useful way.

Since this post is in the archive, it might be best to continue the discussions over at Some thoughts on using Roam as an Obsidian person / Questions for Roam Refugees

1 Like

You may find these help for migration

One other item, after retrieving all my uploads and converting them to local assets, I wasn’t comfortable leaving all of them in firebase. Roam has no provision for upload management, but if you can use Chrome/Firefox dev tools, this may work for you

1 Like

For templating

  • bash/sed/awk/python scripts that output markdown files; because of Obsidian’s open-format/local-first data model, general purpose programming languages can easily serve the templating use case.
  • Alfred Snippets and Text Expansion (I don’t personally use this but the barrier to entry is much lower)
1 Like

Hi, I had the same problem as well. The fix is to export your roam graph in ‘Flat markdown’ format and pull that into your Vault in Obsidian. This is much better than the usual markdown (Indented) format.
Hope this helps. :+1:

It doesn’t work for a bulk export, but I have discovered a pretty simple way to preserve indentation in a single page if you have Roam42 installed. Using the Converter functionality (Alt+M) and choosing “GitHub Flavored Markdown” creates a format that can be copy+pasted into Obsidian with pretty good fidelity to the original (indentation + expand/collapse). It does not preserve internal page links, however, so you’d need to add those back, but depending on the page content that may be far easier than recreating the indent structure.

Are there any other people who frequently made use of Roam’s alias workaround (by using the link feature like [text]([[Page]]) and has found a way to convert them to Obsidian’s [[text | Page]] format? I suspect there might be something like a Notepad++ replace command you could run on a directory of markdown files to achieve this, but I haven’t found the right solution yet.

I found a solution:

By using the following directory-wide search-and-replace command in Notepad++ with Regular Expressions enabled, the program will convert Roam’s alias format to Obsidian’s format:

Search: \[([^\[]*)\]\(\[\[(.*)\]\]\)
Replace: \[\[\2|\1\]\]
In Notepad++, it will look like this:
image

The usual precautions with mass search-and-replace apply: make sure you backup files, etc.

2 Likes