Make complete working copy of existing Node-RED install

Probably a little late @Steve-Mcl ... but wouldn't it have been easier just to copy and rename the flows file, and then it would start by default with flows.json, and the second flows file (archive.json) could be optionally selected via the start command?

for example; node-red archive.json

True yes but the topic was "Make a complete working copy" - so...

And anyhow, if Simon wants to update / change / remove some nodes, it would affect both instances if he did that.

This method gives isolation.

There isn't really a better way - just depends what your requirements are.

2 Likes

Simon, I couldn't get this to work on 2 different machines at all!

OK - alexa-remote2 nodes removed from 2nd instance and that is all OK

Just going thru deleting un-wanted tabs from my main instance but I've got bored after 1st 20 so calling it a night and will resume tomorrow but all looking good so far :slight_smile:

Your other option and one i find a little more useful - is to spin up a virtual machine on the same system - you can then assign it a seperate IP Address - so no need for port changes etc - you can also stop any communication into and out of the VIrtual machine so can leave everything "as is" and only open the machine up when needed.

This gives you a sandboxed environment where you can happily test all upgrades (NR, NPM, NODEJS) without any fear of them interfering with your production system prior to deploying into live

Craig

Craig

1 Like

Made it - cut back to 18 tabs :slight_smile:
Prob don't even need half of them but I'll run like this for a while and see how it goes

To summarise this thread:

I stopped Node-RED from running

Created a folder called c:\users\simon\.nr1881

Copied all files from c:\users\simon\.node-red to c:\users\simon\.nr1881
cd'd into c:\users\simon\.nr1881

Ran node-red -p 1881 -u c:/users/simon/.nr1881 --safe

Disabled any of the tabs I intended to keep running on my standard install

Deployed

(Also removed an alexa contrib node in .nr1881 instance due to port conflicts but that was just peculiar to my setup)

Launched new instance using node-red -p 1881 -u c:/users/simon/.nr1881

Launched my standard install as normal

Deleted all the un-needed tabs in standard install

Happiness :slight_smile:

Thanks @Steve-Mcl :slight_smile:

3 Likes

It certainly is an option however, the overhead of a VM to have a second instance is quite heavy. Its similar to when people say "just run it in docker". Sounds sooooo easy. Phht! I have been around computers, many vendors VMs & hypervisors, programming, PLCs, Robots, various field networking technologies etc etc etc for more years than I can count on 6 hands - and I really struggle with Docker. But, back on point - Copying a folder and typing a command line is a whole lot easier to guide someone through than how to Install Hyper-V, download an OS, create a VM, attach the ISO, set boot order, install to VHD, setup IPs, install NODE/GIT etc etc etc. Then there is the OS maintenance (Firewall, patching etc etc)

I'm not in anyway knocking your completely valid solution - i absolutely do that myself when required - it provides excellent isolation. But I've learned over time - many people really struggle to grasp the inception of a machine inside a machine. If however the OP is au fait with VMs then it certainly is an option.

1 Like

I find the overhead nowadays for most people is minimal - most PCs now come with some form of SSD as primary storage so nice fast disk (as long as space is not an issue) and processors are more than capable of running multiple VMs,

Biggest issue is RAM. But you are right about all the other stuff - i am used to VMWare and can clone and convert a running machine into a VM very easily and quickly (but it is part of what i do for a living)

I was more suggesting that the OP actually clone his live machine and turn that into a VM as he would then have an identical working environment - if he documented the steps he would be able to do that on an as needed basis for testing very quickly.

Docker is a struggle for a lot of people and will take a while for people to understand its potential - and now you have Snaps in Ubuntu to muddy the waters even further !

Craig

Clone a windows machine :shock_horror: :wink: MS would not be amused

PS, Happy cake day.

3 Likes

This info would make a great first entry in the category - "Tutorials".
Seriously, I'm sure a lot of people want/have to do this at some point.

I'm not sure there will be many people with 110 flow tabs that need to rein them in :slight_smile:

If someone wants a 2nd Node-RED instance, I'd always recommend using @TotallyInformation alternate installer method

2 Likes

Me too! :wink:

Though actually, this approach is the most flexible but you can, of course, have multiple instances with a "standard" global install of Node-RED. It's just that I really don't like global installs of node.js apps, especially on Windows. My approach also lets you have independent Node-RED versions in different instances.

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