# Org-roam backlinks not recognized after migration to V2

**URL:** <https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726>\
**Category:** Troubleshooting\
**Created:** [July 3, 2021, 2:25pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726 "2021-07-03T14:25:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://org-roam.discourse.group/u/reyman)\
**Post date:** [July 3, 2021, 2:25pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/1 "2021-07-03T14:25:22Z")

</div>

Hi there,

I’m using Doom-emacs latest, and i’m trying to migration from org-roam V1 to V2.

I run the following scripts, i think with success :

- [Allow to always use id links instead of file links · Issue #1091 · org-roam/org-roam · GitHub](https://github.com/org-roam/org-roam/issues/1091#issuecomment-703531409)
- [Org-roam V2 / org-id ID link resolution problem - #4 by nobiot](https://org-roam.discourse.group/t/org-roam-v2-org-id-id-link-resolution-problem/1491/4)

My doom config :

**Package.el**

```auto
  :recipe (:host github :repo "org-roam/org-roam" :branch "v2"))
(unpin! org-mode)
(unpin! org-roam)

```

**Config.el**

```auto
(use-package! org-roam
  :after org
  :commands
  (org-roam-buffer
   org-roam-setup
   org-roam-capture
   org-roam-node-find)
  :config
  (setq org-roam-mode-sections
        (list #'org-roam-backlinks-insert-section
              #'org-roam-reflinks-insert-section
              #'org-roam-unlinked-references-insert-section))
  (setq org-roam-directory (file-truename "~/Notes/2ndBrain/")
      org-roam-db-location (file-truename "~/Notes/org-roam.db")
      org-roam-link-title-format "%sº"
      org-roam-prefer-id-links t
      org-roam-index-file "20200626221151-index_para.org")
(org-roam-setup))

```

I have :

- properties ID at heading of each org file
- no error
- Links are written like this : [[file:20200626190119-literate\_programming\_lp.org][Litterate Programming]]

Exemple 😭

 ![Capture d’écran du 2021-07-03 16-27-25](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/a261a7d6537bccdc09fbcd8d11bc49173fdf7e75.png)

So, as you see, my `org-roam-buffer` contain only the current node, and nothing else …

Any idea why ?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [July 3, 2021, 2:37pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/2 "2021-07-03T14:37:27Z")

</div>

> [@reyman](#):
>
> this : [[file:20200626190119-literate\_programming\_lp.org][Litterate Programming]]

Use [[id:uuid-of-node][descrption]] instead.

---

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://org-roam.discourse.group/u/reyman)\
**Post date:** [July 3, 2021, 2:49pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/3 "2021-07-03T14:49:16Z")

</div>

Thanks @nobiot but all my links are v1 like that, is there any script to replace automaticaly old link with new link format ? I suppose lot of people are in the same case …

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [July 3, 2021, 4:10pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/4 "2021-07-03T16:10:10Z")

</div>

Look at Jethro’s script. Not at PC now; see the Hitchhiker’s Rough Guide for a link. There should be a couple of threads both in Discourse and Slack.

---

<div class="post-metadata">

**Author:** ![rberaldo](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/rberaldo/32/819_2.png) [@rberaldo](https://org-roam.discourse.group/u/rberaldo)\
**Post date:** [July 3, 2021, 4:23pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/5 "2021-07-03T16:23:58Z")

</div>

Just to complement @nobiot’s answer, here are the links:

- [Hitchhiker's Rough Guide to Org roam V2 · org-roam/org-roam Wiki · GitHub](https://github.com/org-roam/org-roam/wiki/Hitchhiker's-Rough-Guide-to-Org-roam-V2)
- [Migration script · GitHub](https://gist.github.com/jethrokuan/02f41028fb4a6f81787dc420fb99b6e4/)

---

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://org-roam.discourse.group/u/reyman)\
**Post date:** [July 13, 2021, 7:31pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/6 "2021-07-13T19:31:47Z")

</div>

Hum, i already run a migration script, but probably not the good one (see my first post), so i need to go back to v1 to migrate my file, then move again to v2 to run other part of the script. I will try that …

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [July 13, 2021, 8:47pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/7 "2021-07-13T20:47:57Z")

</div>

> [@reyman](#):
>
> Links are written like this : [[file:20200626190119-literate\_programming\_lp.org][Litterate Programming]]

After you run the migration script and still has links like you reported in your first post, then the migration script didn’t work for that particular file; it’s a little hard to believe it worked for none of your files.

You don’t need to go back to to v1 Org-roam. The problem is your notes and not Org-roam. Going back to v1 does not change anything for your note files.

I would try to see what part your notes causes the migration script to fail.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [July 13, 2021, 8:51pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/8 "2021-07-13T20:51:30Z")

</div>

By the way, I don’t see “migration script” in these two bullet points…?? I could be wrong; It’s not easy to see for me. Sorry.

> [@reyman](#):
>
> I run the following scripts, i think with success :
> 
> - [Allow to always use id links instead of file links · Issue #1091 · org-roam/org-roam · GitHub](https://github.com/org-roam/org-roam/issues/1091#issuecomment-703531409)
> - [Org-roam V2 / org-id ID link resolution problem - #4 by nobiot](https://org-roam.discourse.group/t/org-roam-v2-org-id-id-link-resolution-problem/1491/4)

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [July 13, 2021, 8:52pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/9 "2021-07-13T20:52:20Z")

</div>

@reyman  
Did you try this one?

> [@rberaldo](#):
>
> Migration script · GitHub

---

<div class="post-metadata">

**Author:** ![reyman](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reyman](https://org-roam.discourse.group/u/reyman)\
**Post date:** [July 13, 2021, 9:03pm UTC](https://org-roam.discourse.group/t/org-roam-backlinks-not-recognized-after-migration-to-v2/1726/10 "2021-07-13T21:03:40Z")

</div>

Yeah you right, i probably misunderstand the [Hitchhiker's Rough Guide to Org roam V2 · org-roam/org-roam Wiki · GitHub](https://github.com/org-roam/org-roam/wiki/Hitchhiker's-Rough-Guide-to-Org-roam-V2#following-org-id-links-in-migrated-notes), thinking this snippet of code updating the actual link to id.

I need to move to org-roam v1 to rerun the script because some part of the script of @jethro use a function only available in V1 … (step 1)

Edit 1 :

- when you are in V1, run the script given by @rberaldo[Migration script · GitHub](https://gist.github.com/jethrokuan/02f41028fb4a6f81787dc420fb99b6e4/)
- update to roam V2 in doom
- rerun the same script to update the file link.

Ps : for doom people, if you had problems to run `doom sync -u` after changing to v2 in packages.el, run `rm -rf ~/.emacs.d/.local/straight`
