Another machine won't update NR when I run the command

Have you set up scrot to work on a keyboard shortcut? I never had any problems taking screenshots of menus that way, in my years of running both Debian and non-Debian systems (Gentoo, primarily)

Yes, but that is RPI stuff.

I am using a NUC and it is Ubuntu. Though similar they are different.

I don't know if it is SCROT is the thing used in Ubuntu. It just works/worked.

So, what was the lesson learned from this excercis?

In another thread a few weeks ago we discussed taking backups of the sd card once you have a stable, working system. Hopefully, it's that.

1 Like

I hope for much more...

Taking regular backups of sd cards is basic, I would say mandatory, so simple and easy if you have an additional sd card with a (micro) usb reader attached and use the provided utility, "SD Card Copier" (at least for RPi's)

1 Like

Don't stop there. Regularly (perhaps as regular as every Deploy) take a backup of the NR config files and save them "offsite". I'm sure there are a few flows floating around that do this.

Ensure you have documented all processes and procedures required to rebuild (from scratch) all your machines (like NR, vpns, databases, etc etc).

I do make regular backups of the flows to the same SD card, just else where.

But alas it doesn't help in this scenario.

Remote (well: headless) machines are a bit annoying. It would be nice (er) if I could back them up - the whole SD card - over the network.

Why would restoring from a backup not have helped?

Because NODE-RED failed. Not the flow.

Well, that's my take on what happened.

Whenever I've a process documented on paper I try to create Ansible roles around it, both for updates/deploying, as well as remaking/redeploying when needed. Still have to make one for this pi as most of the setup will be moving to another device soon, thanks for the remindeder :slight_smile:

1 Like

But, why not then go back to a recent backup of the whole system?

You have to weigh up the time and effort it takes to diagnose and fault find an issue (which may take days if you are waiting on suggestions from others), to just rebuilding the system, which potentially could take just an hour or so.

At some point you have to cut your losses. We've all been there, done that, many times before. You are not unique in that regard.

1 Like

Hmm. It was working until someone broke it.

3 Likes

When you restore a backup, you wonā€™t just restore your flows. A full backup is like a snapshot, you set the entire system back to the point it was at the moment you created it. Meaning you replace all installed software as well. In practice this would result in setting Node-RED back to before it failed. Regardless of what that cause might have been...

And one other thing I would strongly recommend you do is set up a test rig. Nothing fancy or expensive, a PiZeroW would do the job.

Then load everything up on that and go nuts with it. A PiZero will run most everything fairly comfortably, except perhaps a vpn. Ensure you create a full backup every time there's a major s/w change. Backup your test flows to another RPi as well.

When you have something working as you like it on the test rig then export it to wherever it needs to be. Keep your "prod" machines as pristine as possible to avoid any unexpected downtime.

1 Like

As I am sure I have said before: Hindsight is perfect.

I do not have backups of the whole system.

And so yes, I am having to wear the consiquenses of that choice.

@bobo
which potentially could take just an hour or so.

No. I live in Australia. We have about the slowest internet in the world.

It took about 2 hours to download the Buster image for the RPI and about another 2 hours for all the patches to install.

Yes, I am guilty of that.

I don't see why it needs to be rubbed in.

I am still confused to which is THE command to update NR.

I had this:
sudo npm install -g --unsafe-perm node-red
and once when I used it I was told to use THE command - as there is only one.
A somewhat open and slightly malicious (from where I am) statement.
I updated it to this
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)

But I can not - now - for the life of me say which I used.

I am 99% sure I used the latter one to update NR and that's where all the fun began.

I don't live in a perfect world.

I do not have 100% SD card backups.

I would like to and may have to really get that part working.

I spread my time between the UK and Oz and I can assure you there are some parts of the UK that are just as bad.

That aside, you only have to download an os image once. Then do all your updates, and add your most used software. Then mark that as a point to backup the whole sd card. After that you don't need to do regular software updates if you aren't having any issues.

Then later on after you have been doing some heavy experimenting (with your test rig), and things f*** up, you just restore back to that point, no internet needed.

It does sound like you are making your life a lot harder than it needs to be.