Flows have disappeared!

Hi everyone, I have the same problem as a couple of other people I have seen online but haven't had much luck in solving it from reading the previous answers.

Suddenly some of my flows have disappeared from the node-red dashboard although they are still running.

I understand the solution is a case of finding a hidden file on the server (the file may start with a?) but I don't know where exactly to look for it. Could somebody help me out with some instructions on how to go about finding it navigating the node red files that are saved there please? The server is linux if that helps.

Many thanks in advance.

Restart Node-RED and paste the startup messages here:

, ?---------------------------------------------------------------?
, ¦ ¦
, ¦ New minor version of npm available! 6.4.1 -> 6.9.0 ¦
, ¦ Changelog: https://github.com/npm/cli/releases/tag/v6.9.0 ¦
, ¦ Run npm install -g npm to update! ¦
, ¦ ¦
, ?---------------------------------------------------------------?
,
,
,> node-red-docker@1.0.0 start /usr/src/node-red
,> node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"
,
,17 Jul 12:35:47 - [info]
,
,Welcome to Node-RED
,===================
,
,17 Jul 12:35:47 - [info] Node-RED version: v0.20.0
,17 Jul 12:35:47 - [info] Node.js version: v8.15.1
,17 Jul 12:35:47 - [info] Linux 4.15.0-42-generic x64 LE
,17 Jul 12:35:47 - [info] Loading palette nodes
,17 Jul 12:35:47 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
,17 Jul 12:35:47 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
,17 Jul 12:35:48 - [info] Dashboard version 2.14.0 started at /ui
,17 Jul 12:35:49 - [info] Settings file : /data/settings.js
,17 Jul 12:35:49 - [info] Context store : 'default' [module=memory]
,17 Jul 12:35:49 - [info] User directory : /data
,17 Jul 12:35:49 - [warn] Projects disabled : editorTheme.projects.enabled=false
,17 Jul 12:35:49 - [info] Flows file : /data/flows.json
,17 Jul 12:35:49 - [info] Server now running at http://127.0.0.1:1880/
,17 Jul 12:35:49 - [warn]
,
,---------------------------------------------------------------------
,Your flow credentials file is encrypted using a system-generated key.
,
,If the system-generated key is lost for any reason, your credentials
,file will not be recoverable, you will have to delete it and re-enter
,your credentials.
,
,You should set your own key using the 'credentialSecret' option in
,your settings file. Node-RED will then re-encrypt your credentials
,file using your chosen key the next time you deploy a change.
,---------------------------------------------------------------------
,
,17 Jul 12:35:49 - [info] Starting flows
,17 Jul 12:35:49 - [info] [inject:Cada 10 minutos] repeat = 600000
,17 Jul 12:35:49 - [info] [inject:Cada 15 minutos] repeat = 900000
,17 Jul 12:35:49 - [info] [inject:Encender Proyectores] repeat = 900000
,17 Jul 12:35:49 - [info] Started flows
,17 Jul 12:35:49 - [info] [mqtt-broker:MQTT] Connected to broker: mqtt://176.31.182.164:1883
,17 Jul 12:35:49 - [error] [ttn app:b2f047b0.0c5c58] Error on connection for TTN application node_red_test_2: Error: 5 NOT_FOUND: discovery:app_id:node_red_test_2 not found
,(node:31) UnhandledPromiseRejectionWarning: Error: 5 NOT_FOUND: discovery:app_id:node_red_test_2 not found
, at Object.exports.createStatusError (/data/node_modules/grpc/src/common.js:91:15)
, at Object.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:1204:28)
, at InterceptingListener._callNext (/data/node_modules/grpc/src/client_interceptors.js:568:42)
, at InterceptingListener.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:618:8)
, at callback (/data/node_modules/grpc/src/client_interceptors.js:845:24)
,(node:31) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
,(node:31) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
,17 Jul 12:35:49 - [error] [ttn app:2588d44.467412c] Error on connection for TTN application ruido_lorawan: Error: 5 NOT_FOUND: discovery:app_id:ruido_lorawan not found
,(node:31) UnhandledPromiseRejectionWarning: Error: 5 NOT_FOUND: discovery:app_id:ruido_lorawan not found
, at Object.exports.createStatusError (/data/node_modules/grpc/src/common.js:91:15)
, at Object.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:1204:28)
, at InterceptingListener._callNext (/data/node_modules/grpc/src/client_interceptors.js:568:42)
, at InterceptingListener.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:618:8)
, at callback (/data/node_modules/grpc/src/client_interceptors.js:845:24)
,(node:31) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
,17 Jul 12:35:49 - [error] [ttn app:37176bb0.e47734] Error on connection for TTN application nodered5: Error: 5 NOT_FOUND: discovery:app_id:nodered5 not found
,(node:31) UnhandledPromiseRejectionWarning: Error: 5 NOT_FOUND: discovery:app_id:nodered5 not found
, at Object.exports.createStatusError (/data/node_modules/grpc/src/common.js:91:15)
, at Object.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:1204:28)
, at InterceptingListener._callNext (/data/node_modules/grpc/src/client_interceptors.js:568:42)
, at InterceptingListener.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:618:8)
, at callback (/data/node_modules/grpc/src/client_interceptors.js:845:24)
,(node:31) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
,17 Jul 12:35:49 - [error] [ttn app:795bebc9.dfbfa4] Error on connection for TTN application node_red_test: Error: 5 NOT_FOUND: discovery:app_id:node_red_test not found
,(node:31) UnhandledPromiseRejectionWarning: Error: 5 NOT_FOUND: discovery:app_id:node_red_test not found
, at Object.exports.createStatusError (/data/node_modules/grpc/src/common.js:91:15)
, at Object.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:1204:28)
, at InterceptingListener._callNext (/data/node_modules/grpc/src/client_interceptors.js:568:42)
, at InterceptingListener.onReceiveStatus (/data/node_modules/grpc/src/client_interceptors.js:618:8)
, at callback (/data/node_modules/grpc/src/client_interceptors.js:845:24)
,(node:31) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
,17 Jul 12:35:49 - [info] [ttn app:8d7f139c.a5176] Connected to TTN application nodered2

Start node-red --safe and fix the ttn node.

@bakman2 I have tried the command in both PuTTY and also Portainer but can't get it to work

@ukmoose when I restarted node red I saw the flows were stored in /data/flows.json so went there and according to some advice I have read previously, I copied the flows.json.backup file and restarted node red but I still can't see the flows

How do you normally start node-red?

You need to add the --safe option to that in order to start node-re without starting the flows.
Then you need to fix the issue with the TTN node as @bakman2 suggested.

node-red is running in a docker container ?
Then the --safe option is not going to be easy I believe.

Does the container keep running after startup ?
Then you could try the docker exec -it <containername> /bin/sh option to get into the container and restart node-red with the safe option from there.