sqlite DNS logs on tmpfs #758
-
I would like to poll logs using the API, which requires the sqlite database app. However one of my main goals with polling logs is to avoid excessive wear and tear on the flash memory of the router where I run DnsServer. I was thinking that I could add a tmpfs mount in the the container, where the sqlite database is written, to prevent it from causing that media wear. However I have two concerns:
ps: it would be fantastic to have the option to run this database in-memory only so that the more advanced manual configuration of a tmpfs mount was not a blocker for less experienced users |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Thanks for the post. As you mentioned, you can mount the tmpfs in the container as a volume and then set the database file path for that volume from the app config. The db file gets created if it does not exists. The maxLogDays is the only option at the moment to remove old data. Another option can be planned to limit the number of records too. Will think on this and plan something. What is the usecase for in-memory database that you have since any restart would mean you lose the data? |
Beta Was this translation helpful? Give feedback.
-
Just switch to the Apps section on the GUI and click on Config button for the app to edit it.
You will need to delete the sqlite db file manually from disk. You can find it in the |
Beta Was this translation helpful? Give feedback.
-
I have released Query Logs (Sqlite) v4.1 which supports in-memory database and also includes a new option to limit the number of records the db can contain. Do update the app and let me know your feedback. |
Beta Was this translation helpful? Give feedback.
Thanks for the post. As you mentioned, you can mount the tmpfs in the container as a volume and then set the database file path for that volume from the app config. The db file gets created if it does not exists.
The maxLogDays is the only option at the moment to remove old data. Another option can be planned to limit the number of records too. Will think on this and plan something.
What is the usecase for in-memory database that you have since any restart would mean you lose the data?