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

**URL:** <https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997>\
**Category:** General\
**Created:** [1 September 2019 11:12 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997 "2019-09-01T11:12:40Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [3 September 2019 12:52 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/21 "2019-09-03T12:52:44Z")

</div>

> [@Trying\_to\_learn](#):
>
> but when I press the to get a screen shot, I lose the menu I see.

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)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [3 September 2019 20:31 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/22 "2019-09-03T20:31:23Z")

</div>

> [@afelix](#):
>
> 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

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.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [4 September 2019 04:04 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/23 "2019-09-04T04:04:41Z")

</div>

So, what was the lesson learned from this excercis?

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [4 September 2019 04:07 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/24 "2019-09-04T04:07:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [4 September 2019 04:11 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/25 "2019-09-04T04:11:45Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [4 September 2019 04:26 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/26 "2019-09-04T04:26:25Z")

</div>

> [@krambriw](#):
>
> I hope for much more...

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).

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 September 2019 05:23 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/27 "2019-09-04T05:23:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [4 September 2019 05:30 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/28 "2019-09-04T05:30:49Z")

</div>

Why would restoring from a backup not have helped?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 September 2019 05:31 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/29 "2019-09-04T05:31:56Z")

</div>

Because NODE-RED failed. Not the flow.

Well, that's my take on what happened.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [4 September 2019 06:21 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/30 "2019-09-04T06:21:24Z")

</div>

> [@Bobo](#):
>
> Ensure you have documented all processes and procedures required to rebuild (from scratch) all your machines (like NR, vpns, databases, etc etc).

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 🙂

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [4 September 2019 07:32 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/31 "2019-09-04T07:32:08Z")

</div>

> [@Trying\_to\_learn](#):
>
> Because NODE-RED failed. Not the flow.

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 September 2019 07:48 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/32 "2019-09-04T07:48:43Z")

</div>

> [@Trying\_to\_learn](#):
>
> Because NODE-RED failed

Hmm. It was working until someone broke it.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [4 September 2019 08:45 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/33 "2019-09-04T08:45:26Z")

</div>

> [@Trying\_to\_learn](#):
>
> Because NODE-RED failed. Not the flow.

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...

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [4 September 2019 10:49 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/34 "2019-09-04T10:49:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 September 2019 21:21 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/35 "2019-09-04T21:21:56Z")

</div>

> [@Bobo](#):
>
> But, why not then go back to a recent backup of the **whole** system?

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.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 September 2019 21:27 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/36 "2019-09-04T21:27:36Z")

</div>

> [@dceejay](#):
>
> Hmm. It was working until someone broke it.

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.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 September 2019 21:29 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/37 "2019-09-04T21:29:35Z")

</div>

> [@afelix](#):
>
> A full backup is like a snapshot,

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.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [5 September 2019 02:08 UTC](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997/38 "2019-09-05T02:08:18Z")

</div>

> [@Trying\_to\_learn](#):
>
> No. I live in Australia. We have about the slowest internet in the world.

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.

[Previous page](https://discourse.nodered.org/t/another-machine-wont-update-nr-when-i-run-the-command/14997.md?page=1)
