Skip to content
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

Will upgrading vnstat result in any loss of logs/database/stats? #68

Closed
hub2git opened this issue Aug 11, 2017 · 5 comments
Closed

Will upgrading vnstat result in any loss of logs/database/stats? #68

hub2git opened this issue Aug 11, 2017 · 5 comments
Labels

Comments

@hub2git
Copy link
Contributor

hub2git commented Aug 11, 2017

My router with LEDE (version 17.01.2) has vnstat version 1.12. I could upgrade it to vnstat version 1.17 by following instructions on https://forum.lede-project.org/t/why-vnstat-is-at-version-1-12-1-only/1179/21

My Linux Mint 18.2 Xfce has vnstat version 1.14. I could follow the instructions on https://askubuntu.com/questions/938293/update-vnstat-to-1-17 to upgrade to vnstat 1.17.

Here's my question. If I upgrade the vnstat on my Linux Mint computer or my router, will I lose some vnstat data/logs/stats that are being saved?

Another question: Before I can upgrade to vnstat 1.17, wouldn't I first have to remove my current vnstat? If so, am I right to think that uninstalling would remove all the vnstat logs/stats/database?

@vergoh
Copy link
Owner

vergoh commented Aug 11, 2017

Upgrade directly from both versions 1.12 and 1.14 to version 1.17 is supported without losing data. Based on a quick check, neither of those linked instructions do anything destructive either. However, it depends on how the distribution packaging has been done regarding what gets removed when the package is uninstalled. It doesn't hurt to take a backup of the database files. Note that the configuration file contains new options so check those out and tune if needed. See the UPGRADE file that comes with the source package for a list of new settings and man vnstat.conf for a description of what those settings do.

@hub2git
Copy link
Contributor Author

hub2git commented Aug 12, 2017

Thanks, Vergoh. I'll close this issue. I haven't upgraded yet. If I have issues with data loss, I may reopen this issue. :)

@hub2git hub2git closed this as completed Aug 12, 2017
@hub2git hub2git changed the title [Question] Will upgrading vnstat result in any loss of logs/database/stats? Will upgrading vnstat result in any loss of logs/database/stats? Aug 18, 2017
@hub2git
Copy link
Contributor Author

hub2git commented Sep 2, 2017

@vergoh said

It doesn't hurt to take a backup of the database files.

Should I simply copy the relevant files and folders to my backup location? If so, which files and folders should I copy?

Or do you suggest using the --exportdb option?

http://humdi.net/vnstat/CHANGES says

1.17 / 16-Feb-2017

  • Fix: --importdb was creating invalid databases since version 1.15

So since my versions are 1.14 and 1.12, I believe this "invalid-database" issue won't affect me.

@hub2git hub2git reopened this Sep 2, 2017
@hub2git
Copy link
Contributor Author

hub2git commented Sep 2, 2017

Another question: What happens if I upgrade directly to vnstat 2.0? Any loss of database/logs/info?

@vergoh
Copy link
Owner

vergoh commented Oct 11, 2017

During the first daemon startup of version 2.x, all found version 1.x databases get automatically imported to the version 2.x database. Because the new database is a single file for all interfaces, the old version 1.x database files are kept in place, just in case the user wants to downgrade for some reason. Nothing is lost during the import process.

@vergoh vergoh closed this as completed Dec 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants