jow- / nlbwmon

Simple conntrack based traffic accounting
ISC License
147 stars 33 forks source link

[Question] What happens to the backup/log if router loses power? Will the new file overwrite all the previously-kept data? #10

Closed hub2git closed 6 years ago

hub2git commented 6 years ago

Let's say my nlbwmon program is happily doing daily backups of the bandwidth for August 1 through 15 to the USB stick inserted on the back of the router.

On August 20, there is a power outage to the city and the router abruptly loses power. There is no power for a few days (Aug 20 through 24). On Aug. 25, power is restored and the router is powered on. What happens from Aug. 25 onwards? When nlbwmon tries to backup to the USB stick, will it overwrite the data from Aug. 1 through 15? In other words, will the USB stick now contain just August 25 onwards?

Or will the USB stick -- this is my hope -- contain Aug 1-15 and Aug. 25 onwards?

jow- commented 6 years ago

nlbwmon attempts to import the last archived database into its scratch space and will append new data to it.