Missing a Tab but still working in background

Hello All. I am in a strange situation. In the node red configuration page. I have the tabs up top. All of a sudden today I am missing a tab... I don't know why it doesn't display. I know it is still technically there and working because It is hooked up to twitter and a database and all of that is operational. I don't know how to get the tab back. it is displayed on the right hand side when I click dashboard. if I go to the UI I have half of the items there temp /humidity /pressure display but a few of the buttons are missing. (correction, the ones in the tab are missing, the ones that are still displaying are on a different tab)
I have node red v20.5.
Ubuntun 18.04
Virtualised server with 40gb and 8gb ram. Plenty of left over space 80% free
I have tried 2 different browers. 2 different comptuers. Cleared cache. Tried restarting server and node red. How do i get it to show up? Any suggestions. I do have a backup of the flow from 2 weeks ago which is good I guess but doesn't have latest changes :frowning: I can attach screenshots if
that would help as well

The only thing I have done majorly with it lately besides tweaking a few nodes. i have upgraded all the3rd party nodes last week. I then let them sit in the pending upgrade state until today to do the upgrade. However, this was noticed before i restarted. I only restarted in an effort to get the tab back that I am missing :frowning:
Let me know :slight_smile:

Edit: I have updated to .20.8 and still no flow tab. Looking at the flows of where everything is located. it is still in there I believe as I can see my twitter and db nodes.
Edit 2: I have found the flow, I originally using the wrong one. json it was using my god. I don't know how I am going to reverse this. It appears something/somehow removed the tab. Which removed the "id". It also removed all of the "z" id's from the nodes which leaves them abandon. Even if I were to add a new tab and try and add them back I have to do it manually by adding the ID to the Z for every node. This is IF I am understanding how everything is linked right?

I'm not an expert, but reading what you say, I think you are learning a lesson I have learnt recently.

You need to keep backups.

To me that is indicative that the code has gone.

Towards the end you are clearly showing signs that you are stressed.
Been there many times.

Sorry but my take on it is: BACKUP!

There is nothing wrong with copying your flows (~/.node-red/*.json) and copying them somewhere else.

That way if anything goes wrong, you can restore.

Yes You are right I should do regular backups. and looking through most of my flows I have backups of them on github. I have others that are 2 months old and missing tons of changes. I took one this past week and for the life of me I can't find it. My main concern is why did this happen? There is no logical reason for it to strip it. This morning I checked on my flows but didn't change anything. come back to work on them in the afternoon and notice a tab is gone. Why is it gone? I haven't pushed any changes? looking at the backups that are done automatically by the system that took the changes it went with it. Why did it remove my tab but leave ALL my nodes that I can see see on the right hand side but I can't do anything with. They are essentially sitting there in an abanon state with no tab id attached to them so I cant select them to export them to move them to a new tab


I think you are asking the wrong kind of questions:

I feel this needs to be chalked up to It happens. But to learn from it is good.
Make back ups.

All the stuff about tabs..... Need screen shots so everyone is on the same page.

How are these:

What kind of backups?

System backups are way different to NODE-RED backups. Unless you are talking ENTIRE SYSTEM backups.

So I have done backups. of some of my individual flows and pushe them manually to github. Looking through the files it would APPEAR. when node red is restarted it makes a flow.(servername).json.backup file

Also I have solved my problem THANK GOD. As I digged in, for WHATEVER reason node red deleted the tab. I would like to blame it on myself but the UI has protectionsn for that and will not let you abandon the nodes, you either delete them or move them. ayway. Tab was deleted. I created a new tab through the interface. I took the tab ID then found and massed replaced all the Z id's becuase they were "Z": 0, making it abandon so I replaced "Z":0, with "Z":"newtabid", winscp it to the server, restart node red and boom it works with the new ID.
I have wanted to do automated backups but I can't find any that are through flows with the exception of 1 that was setup an offsite (or another server) FTP and have it backup the flow.json an other settings then upload it to FTP.
Do you have any flows that back it up internally on the server? because my server is virtualized and I take 7 day rotational snapshots but checking the problem of my tabid , it somehow was abandon passed my backups but it just showed up today. So I could not roll back snapshots to save it

This is my effort at backing Node-Red stuff up.

Rename it to .sh (can't attach .sh files) and use it.

NR_Backup.txt (699 Bytes)

If you manage to find a flow file containing the missing tab, you should, I think, be able to import the whole file. Then delete the duplicate tabs.

I goes without saying that you shouldn't play with this idea without taking a backup of your flows and credentials files.

You should probably also turn on "pretty" flow files in settings.js which makes it much easier to diff them which will work better with git.

Of course, you can also turn on projects which integrates with git. But you still have to commit changes.

If you haven't left the editor web page and something disappears, you may be able to ctrl-z to undo as well.

Script nice, flow better :partying_face:

[{"id":"7df857ca.171fb","type":"exec","z":"c7a7f9b9.d798d8","command":"zip -rq /home/administrator/node-red-storage/node-red-backup-$(date +%Y-%m-%d).zip /home/administrator/.node-red","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"backup","x":295,"y":112,"wires":[[],[],["29d0137c.b29d64"]],"l":false},{"id":"84177a7f.4db6a","type":"inject","z":"c7a7f9b9.d798d8","name":"daily @0300","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 03 * * *","once":false,"onceDelay":0.1,"x":164,"y":84,"wires":[["7df857ca.171fb"]]},{"id":"29d0137c.b29d64","type":"switch","z":"c7a7f9b9.d798d8","name":"success","property":"payload.code","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":351,"y":112,"wires":[["64b0e737.f221c"],["7299eacf.b76134"]],"l":false},{"id":"64b0e737.f221c","type":"exec","z":"c7a7f9b9.d798d8","command":"find /home/administrator/node-red-storage/*.zip -mtime +7 -type f -delete","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"delete > 7 days","x":407,"y":84,"wires":[[],[],["784b031.b62effc"]],"l":false},{"id":"7299eacf.b76134","type":"change","z":"c7a7f9b9.d798d8","name":"error","rules":[{"t":"set","p":"payload","pt":"msg","to":"Node-RED backup failed. Check logs.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":547,"y":112,"wires":[["56ee08a8.6786c"]],"l":false},{"id":"784b031.b62effc","type":"switch","z":"c7a7f9b9.d798d8","name":"success","property":"payload.code","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":491,"y":84,"wires":[["3c040af4.213ade"],["7299eacf.b76134"]],"l":false},{"id":"3c040af4.213ade","type":"change","z":"c7a7f9b9.d798d8","name":"notify","rules":[{"t":"set","p":"payload","pt":"msg","to":"Node-RED backup succesful.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":547,"y":56,"wires":[["56ee08a8.6786c"]],"l":false},{"id":"992586de.7d1518","type":"inject","z":"c7a7f9b9.d798d8","name":"On Demand","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":154,"y":140,"wires":[["7df857ca.171fb"]]},{"id":"56ee08a8.6786c","type":"debug","z":"c7a7f9b9.d798d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":603,"y":84,"wires":[],"l":false}]

I have an nfs mount to another server, so the backups are not stored on the same machine and I use a telegram notifcation instead of debug output.

@biz if you can send me your flow file via direct message or email, with information as to which tab you believe is missing, I'd like to take a look so see what has happened.

Thanks. What I have done today in spite of my virtual server daily snapshots that last 7 days. Also used this flow backup. I spun up a docker FTp server on a seperate virtual machine. I know this is not totally fool proof as the whole server could go down but it's better than what I have. Also will eventually get rotational external hard drive backups working.

Yes I can . I will now need to find the old affected one I have not modified

Is that script I sent any good?

Yes that would have worked. I just used a premade flow instead. Honestly I probably spent the same amount of time pulling a docker image configuring it as it would have taken me to change variables in your script as I don't run on pi and setup a cron job to run daily but ty! Other will appreciate this and I will keep this as well for potential future use.