After enabling "Save vnstats stats" under System -> OpenMPTCPRouter -> Advanced Settings -> Other Settings
I'd expect the vnstats backup to create and update the vnstat db, and load it up on the next reboot.
So that, my stats won't be lost and I'd be able utilize monthly quota settings as expected.
Current Behavior
Although I can observe vnstat_backup task running and creating a backup db under /var/lib/vnstat/vnstat.db it does not persist on reboot, as /var directory is symlinked to /tmp and anything and everything under it is deleted on reboot.
Possible Solution
I've configured vnstat (/etc/vnstat.conf) and set DatabaseDir to point to a different path "/data/vnstat/" and that solved the issue for me.
Another solution might be to stop symlinking /var to /tmp, but I'm not sure what other side effects that might cause.
Steps to Reproduce the Problem
Enable "Save vnstats stats"
Use the router to create some RX/TX stats.
Wait for the backup to kick in and create the backup file.
Reboot the router
Observe that the stats are now cleared out without any past history.
Context (Environment)
I'd like to use the monthly quota functionality as one of my uplinks is a limited quota LTE connection with overage charges.
Due to mandatory router restarts thanks to the load-shedding/blackout practices I lose all my previous stats, thus can not properly track usage.
This causes the connection to go beyond the set quota and overage charges.
Expected Behavior
After enabling "Save vnstats stats" under System -> OpenMPTCPRouter -> Advanced Settings -> Other Settings I'd expect the vnstats backup to create and update the vnstat db, and load it up on the next reboot. So that, my stats won't be lost and I'd be able utilize monthly quota settings as expected.
Current Behavior
Although I can observe vnstat_backup task running and creating a backup db under /var/lib/vnstat/vnstat.db it does not persist on reboot, as /var directory is symlinked to /tmp and anything and everything under it is deleted on reboot.
Possible Solution
I've configured vnstat (/etc/vnstat.conf) and set DatabaseDir to point to a different path "/data/vnstat/" and that solved the issue for me.
Another solution might be to stop symlinking /var to /tmp, but I'm not sure what other side effects that might cause.
Steps to Reproduce the Problem
Context (Environment)
I'd like to use the monthly quota functionality as one of my uplinks is a limited quota LTE connection with overage charges. Due to mandatory router restarts thanks to the load-shedding/blackout practices I lose all my previous stats, thus can not properly track usage. This causes the connection to go beyond the set quota and overage charges.
Specifications