Using RAMdisks for /tmp and /var - Traffic Totals gone after power loss - Which setting to choose to write to disk?
-
Using the Traffic Totals add-on but also using the RAM Disk option to minimize writes. UPS battery failed so I'm in the process of replacing it with big, beefy ones (DIY modification project). In the meantime, lost power twice today for a minute each and the router also lost power and came back successfully, but Traffic Totals reset to 0.
Periodic RAM Disk Data Backups
- RRD Data
- DHCP Leases
- Log Directory
- Captive Portal Data
In System --> Advanced --> Miscellaneous which one of these applies to Traffic Totals? Is it RRD Data? Log Directory? Or if it's none of the above, then that means I would need to turn off the RAM Disk for /var, but that's a last resort.
Thanks.
Edit:
The SQLite database is located in /var/db/vnstat/vnstat.db so if none of those 4 options to periodically backup RAM Disk to disk apply, that leaves me with two options:
- Simply disable the RAM Disk for /var
- Manually create a cron job (or other automation) that copies that database somewhere safe in the event of a system reboot.
-
A feature request to add backing that up might be best: https://redmine.pfsense.org/
If there isn't one already.Otherwise that data will be lost if you have /var as a ramdisk.
Steve
Edit: There is: https://redmine.pfsense.org/issues/11797
Add comments there -
I can't be the only one using both Traffic Totals and a RAMdisk. Is there a way to get some love on this bug?
-
Add comments to the bug there.
I use that combo here but I guess I just don't hit it often enough for it to be an issue.
-
@stephenw10 I already did back in April. I don't have anything else to add. It's assigned to "John Cornwell" as of 2 years ago, but I have no idea who that is on the Netgate team.
-
That was just the reporter. Not sure why it was set to that. Added a target version.