-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid database timestamp. #55
Comments
Was there some reason why 1.16 wasn't able to directly use the database files created by 1.12? |
I just updated the system on my router today and I used vnstat 1.16. I just started vnstat and the syslog was flooded with these errors:
I guess you're right. I corrected the values but vnstat still is showing the same error. |
1.16 introduced database validation before file write and when loading a database after I got one report of a situation where the cached database got somehow corrupted in memory which then resulted in data getting corrupted in the written database itself. I never managed to replicate that situation so I can only assume it might have been some sort of random rare hardware glitch. It's possible that you've encountered something similar if your previous backups before 5th January 2017 show The solution itself is simple as you can just copypaste the |
Yeah, I did that and I'm still getting those errors. Non-working:
Working:
Any suggestions on how to fix this issue? |
What command are you using for the database import and is the daemon stopped while importing? |
Actually I'm wrong. Both of those files fail to work but here's the thing. The database file from eth0.2 interface is working but the exportdb file created from that database and then imported back to vnstat is giving the timestamp issue. I'm lost. Is it possible that there is something wrong with timestamp verification? |
vnstat -i eth0.2 --force --importdb "/mnt/sda3/vnstat/exportdb/exportdb_eth0.2_(2017-02-04)"; and yes, the vnstat is stopped while doing this. Update1: I think I'm just gonna give up. Update2: OK, so now I'm almost sure there is something wrong with vnstat itself.
Those where new files created a few second ago by vnstat itself. Is there a way to disable those timestamps verification? Please keep in mind that my router doesn't have RTC clock, maybe that's the issue. Where you maybe able to conform the issue? |
Now I'm a little confused. The first error you've mentioned shows the interface as being 'wlan0' but then it's 'eth0' in another error and then the exported file points to 'wlan0' and now there's also 'eth0.2'. The daemon process is also called 'vnstatd', not 'vnstat'. What's the actual setup you are having, do all interfaces cause errors and what are the commands + their outputs you are executing? |
I have 4 or 5 interfaces configured so the name isn't really relevant. It's br-lan, eth0, eth0.1, eth0.2 and wlan0. Only eth0.2 database is working correctly with 1.16, right after switching from 1.12. The rest of the databases are "Invalid database timestamp." So when I restore the previous databases that show correctly their results when typing "vnstat" (those databases are from January 5th) and then backup them again with --exportdb and restore them with --importdb all of them stops working. The The same happens with new databases. For test I created 5 new databases for interfaces mentioned above. Then I --exportdb and --importdb them and vnstat failed again with Invalid database timestamp. Which is ridiculous since those databases where created just a few minutes before. I was able to go back to 1.12 and everything works fine there. I couldn't test this with 1.15 cause the packet is not available. I don't think it matters though since according to you this "timestemp" stuff was introduced in 1.16. Sorry if my posts have been a bit messy but like I said the name of interface does not matter. If there is something I could help you with or clarify something then please let me know. For the actual setup please see this:
|
I've now managed to reproduce the situation and can confirm that there's a bug in the The good news is that a workaround can be used to fix the problem after import. If the used import command is for example
then follow that command with
That will cause the database validation to be ignored for one update which will also update the |
I updated from 1.12 to 1.16 and I got this error.
Error: wlan0: Invalid database timestamp.
Error: validation of imported database failed.
How do I fix this? I can't even import my backup databases.
The text was updated successfully, but these errors were encountered: