Ok, I have been down this road before - sorry.
I have a SHOCKING memory to what was resolved from my question.
What I think:
All nodes have a unique id so when they have an error it is given and you/I can search for that node.
I say example, but they are from real errors that happened on different machines.
The format is usually like this: (example) 90c309f3.55a2
I asked a while back because I was getting errors with no . in the node's ID field.
They look like this: (example) e4cf8781c0c037bf
Yet, today I see that this IS valid.
Could someone who is up to speed with all this mind helping me understand what is what?
Thanks in advance.
If a machine is doing its job and I am not doing further development on it, and it is not exposed to the internet, then my policy is to leave it alone.
If I have to do any significant new work on it, however, then I upgrade it first, make sure it still works, and then start the new development.
That is the way I do it (using clonezilla, which gives relatively small images as it only images the used sections of the card, not all the empty space.).
Yes. But you need another device of at least the same size. So on a Pi, a USB stick would do the trick. You can use the age-old dd utility to do an exact backup of any storage device on Linux.
Well, actually that's not true! If you have a large SD-Card you could partition it (not a lot of actual help of course!). Or you can dd to a file and move that off-device.
I am pretty sure it does need to be unmounted, as if a file is being written to as dd is reading that files area the file (or folder) could be corrupted in the image.
As said: I may just have to go with clonezilla as suggested.
Just taking the main machines offline to to backups is not ..... good.
But if it has to be done, then so be it.
I do backup my flows to a USB stick now and then (only when things change) so that does reduce a lot of heartache.
I need to get smarter so NR monitors / detects new backups (watch node?) and copies them to the USB stick.
Ok, quick explanation of why I'm doing it that way:
The USB is formatted NTFS. (Good and bad)
The SD card supports sharing and I share the public directory so I can copy any backups to a REMOTE machine. I still haven't got that working as good as I would like.
So as a second option I also copy them to the USB stick.
Then if the SD card goes fft! I have a backup on the USB stick.
This is a whole other can of works - active backups - so I shall not carry on about that here.
When I get time/motivation I will have to look at getting something working that keeps active backups.
But that in itself may need to be backed up now and then..... argh!
dd on a mounted drive has some potential risks but it has been the go-to tool for decades. But as shown, there are loads of other tools too. The Linux filing systems are very robust and handle this kind of thing very well.
Depending on how complex your OS config is. An easy answer is to keep a pre-configured spare to hand and only back up the node-red (and db maybe) essentials. I've shared some scripts for node-red backups before and you can simply extend to zip up the latest and SCP/FTPS it to another device.
Recovery is as simple as copying over the latest node-red backup, swap the card and go.