openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.48k forks source link

vnstat: No version of vnstat can use db files from a previous build #23782

Closed BlessDeix92 closed 7 months ago

BlessDeix92 commented 7 months ago

I tested OpenWRT release versions 18, 19, 21, 22, and 23, and every version fails to correctly import and re-use existing vnstat database files from the previous version.

I've known this for years. This isn't a new issue. It's possible it's never ever worked. I have my own script which I run before an upgrade to export the files to txt format and then import them after the upgrade. However, now that I want to migrate to vnstat2, it's impossible because the --exportdb and --importdb arguments have been removed, and vnstat2 also fails to import the binary files from any previous vnstat1 version.

So, just to be clear, in addition to vnstat v1 not being able to read databases from any previous build, v2 can't read previous v1 dbs either.

Every vnstat db file seems to be build-unique and can't be recognized from any other.

Running "./vnstatd -D -n" does not give much info, except that it's broken

        Importing data from legacy database "eth0.2".
        db: Database read failed for file "/srv/vnstat/eth0.2".
        Error: Database load failed even when using backup (No such file or directory). Aborting.

Google results prove that db corruption problems are extremely common with vnstat. This is probably why it's author migrated to sqlite as a back-end.

BlessDeix92 commented 7 months ago

This is an ipq806x device, ea8500.

brada4 commented 7 months ago

Upstream documentation details actions to take: https://github.com/vergoh/vnstat/wiki/Usage-%23-Migrating-data

brada4 commented 7 months ago

Please close duplicates.

BlessDeix92 commented 7 months ago

Please close duplicates.

Which duplicates are you referring to?

BlessDeix92 commented 7 months ago

Upstream documentation details actions to take: https://github.com/vergoh/vnstat/wiki/Usage-%23-Migrating-data

This does not address my issue. The documentation you referenced simply says "it will happen automatically". My report proves it does not. Further, the upstream documentation supports much of the information that I have provided.

brada4 commented 7 months ago

23781 ?

23780 not backed by any logs or confs either.

BlessDeix92 commented 7 months ago

Your attitude is abusive. Look into these issues and if you find I have made a mistake in my reporting, then we can talk about it.

I went through a lot of trouble to report these bugs. Why should I bother if I'm going to get shit on by toxic behavior?

If you don't want to fix bugs, just don't reply. Don't do any work. That's fine. It's your code base, but don't fucking abuse me with false accusations of not providing enough info, filing duplicate reports, or other lazy dumb shit. You are just wasting my time with boiler-plate copy-paste time-wasting crap.

Tell me how much work you've put into any of these bugs to demonstrate that I'm wrong.

23781 ?

What is your question? Question mark means nothing. You need to put some effort into typing. I put a lot of effort into reporting these bugs. You can be bothered by typing whole words and sentences.

That bug is for an entirely different package.

23780 not backed by any logs or confs either.

None are needed. The code does not support stopping the service. The init script simply does not support stopping at all. It's like someone slapped together some copy/paste from another service but forgot half of it.

brada4 commented 7 months ago

I dont get errors you describe, you need to write up on how to reproduce them. Really simple - gather eth0 to /mnt/sda for 1h, uninstall, install other, it imports database.