Yesterday I posted a question about a problem I found when trying to export a flow from one raspberry pi to another, I found that spacers are not included in an export/import. I am relying on spacers to be able to align things in my Dashboard UI and make it look better, but if the spacers are not included in the export/import then it will make deploying my flow in multiple systems and later updating them with changes to the flow difficult.
I am creating this flow for use on Raspberry Pi compute modules - which require an IO board for flashing - this makes it more difficult to deal with than if it were an SD card...
Are there any other options that can be done to avoid having to do a complete flash for updating the flow with the spacers and layout intact? Would a replacement of the complete .node-red directory on the Pi work?
You can copy just the flows file to get the flows. However, if you want to get a working system with any additional nodes installed then also copy package.json and package-lock.json and probably settings.js. Then go into the .node-red directory and run npm install
that will pull in any additional nodes the flow requires (they are specified in the package files).
Hi @Colin - thanks again for your quick reply. I just tested this method and it works - just need to rename the machine part of the flows_machinename.json to the new machine, and copy any context settings to the new context folder. Copying the flows file seems to work much better than export/import as it also retains the Dashboard theme and settings.
in your settings.js file - you can fix the flow file name so you don't have to rename it per device... (as long as you copy over the settings.js file also)