Traffic Totals lost upon reboot when using a ramdisk for /var and /tmp
When using a ramdisk for /var and /tmp, RRD Data and log files are saved from the ramdisk to disk on a regular basis (once per day by default). However this doesn't appear to be the case for traffic totals and as a result, they are lost whenever pfsense reboots.
I'm experiencing this as well in pfSense
2.6.0 CE and Status_Traffic_Totals
2.3.2_2 as of April 2023. Upon reboot or shutdown, all Traffic Totals -- which I believe are stored in
/var/db/vnstat/vnstat.db -- reset to 0.
A) Perhaps an Option can be added to System --> Advanced --> Miscellaneous?
Periodic RAM Disk Data Backups
1. RRD Data
2. DHCP Leases
3. Log Directory
4. Captive Portal Data
5. Traffic Totals
B) Perhaps a future version of the Traffic Totals plug-in can store that db somewhere persistent instead of
/var? Such as
I'd like to continue using the benefits of the RAMdisk to minimize wear and tear but very much like the Traffic Totals functionality and would like it to survive reboots, upgrades, etc.