Moving the flows from windows to linux ubuntu machine

Hi,
I'm planning to move all my work from node-red v 3.0.2 in windows 11 pro to the same version on a ubuntu 22.04 virtual machine created with Hyper-V.
Ubuntu NR is already installed and ready to import my ecosystem.

Which is the suggested strategy to move all my flows and imported nodes to the new machine?

I understand that the flows are in flows.json file and the nodes in node_modules folder. Can I simply move this file and folder to the new machine or is there a better suggested procedure?

TIA

I wouldn't move the folder, some Node Modules will use binary specific builds for the OS.
its like running a *nix binary on Windows - not going to work

Honestly, just export your flows in the editor from Windows, and import again in the editor in Ubuntu
The editor will complain of missing modules, you just then install them via the palette manager.

You may need to provide credentials if any nodes requires them.

I should note: you can "rebuild" native modules - but sometimes it doesn't go to plan.
I think for the smoothest transition, just use the export/import features of the Edittor, and take care of any missing module via the palette manager

Have you looked into the projects of NR?
I tried once to revert from a project that is on GitHub (private repo) and it worked very well.

1 Like

My Flows are also a Node RED project on a private Repo.
Mainly to have a sound backup system, more than anything else. :sweat_smile:

but does help, when I'm re-imaging my pi.

Hi Marcus,
I will follow your wise suggestion. It will take more time, but it’s safer.

Thank you

You can copy over the whole userDir folder EXCEPT the node_modules folder. Don't copy that. For starters it tends to be enormous. More importantly, not all of the nodes will work.

Once you've copied over, use a command line:

cd ~/.node-red
npm install

That will finalise the install.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.