0
votes

I have a Node-RED flow. It uses a sqlite node. I am using node-red-node-sqlite. My OS is Windows 10.

My sql database is configured just with name "db" :

enter image description here

My question is, where is located the sqlite database file?

I already search in the following places, but didn't found:

  • C:\Users\user\AppData\Roaming\npm\node_modules\node-red
  • C:\Users\user\.node-red

Thanks in advance.

Edit

I am also using pm2 with pm2-windows-service to start Node-RED.

3

3 Answers

0
votes

If you don't specify a full path to the file in the Database field it will create the file in the current working directory for the process, which will be where you ran either node-red or npm start.

0
votes

Use full path location with file name. It should work i guess.

0
votes

This isn't a valid answer, just a workaround for those who have the same problem.

I could't find my database file. But inside Node-RED everything worked just great. So. this is what I have done as a workaround:

  1. In Node-RED, make some select nodes to get all data from tables
  2. Store the tables values somewhere (in a .txt file or something like that)
  3. Create your database outside Node-RED, somewhere like c:\sqlite\db.db. Check read/write permissions
  4. Create the tables and insert the values stored from old database
  5. In Node-RED, inside "Database", put the complete path of the database. For example, c:\sqlite\db.db

In my case this was easy because I only had two database with less than 10 rows.

Hope this can help others.

Anyway, still waiting for a valid answer :)