SQLite table deleting over night, any advice!

I am storing it in /tmp/SQLite. Do you have a suggestion for a better folder?

Rather depends on the data. Personally, I try to keep all data related to Node-RED in the userDir folder (normally ~/.node-red) so that everything is together. Don't use ~ in your nodes though as this is an environment setting and may not always work. Use the absolute path instead. Probably /home/pi/.node-red in your case.

Thanks for the help.

Well I'm glad we spolved that mystery. Personally I would careae a pi/databases folder and stick it in there but anywhere but /tmp is good! :smile:

/tmp is a virtual disk in ram, I think. So when you reboot it ceases to exist. Put it somewhere in your user area, possibly even in the .node-red folder, it won't do any harm there and you can just add it to your backup strategy backing up your flow file.

P.s. Why are you rebooting the pi every night?
I have one that has been up for 21 days
another for 35 days
another for 135 days

The image for the pi I used was from another application. The Cron job was added for that specific application, not sure why. I didnt look at them before i started this project.

Mine often stay up for years :slight_smile:

2 Likes

How the heck did you manage to swing that? =)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.