• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Traffic Totals backup how?

Scheduled Pinned Locked Moved Traffic Monitoring
11 Posts 4 Posters 2.5k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    error_account
    last edited by Feb 20, 2021, 7:46 PM

    Hello,

    How can I make a backup about Traffic Totals charts an restore it after clean install or after a simple backup & restore action?
    I tried the backup & restore so now I lost my previous stats :(

    Thank You

    T 1 Reply Last reply Feb 21, 2021, 1:38 AM Reply Quote 0
    • T Offline
      Traveller @error_account
      last edited by Feb 21, 2021, 1:38 AM

      @error_account The data used by traffic totals is created by vnstat. vnstat stores it data in a database located at /var/db/vnstat/vnstat.db

      I'm not sure the best way to backup a specific file. There is a Backup package, but I have not used it.

      E 1 Reply Last reply Feb 21, 2021, 10:53 AM Reply Quote 0
      • E Offline
        error_account @Traveller
        last edited by Feb 21, 2021, 10:53 AM

        @traveller Thank You, so isn't there a "built-in" backup solution for this problem (include the "extra data" option in the Backup & Restore)?

        T 1 Reply Last reply Feb 21, 2021, 2:14 PM Reply Quote 0
        • T Offline
          Traveller @error_account
          last edited by Feb 21, 2021, 2:14 PM

          @error_account Not that I know. However, I only recently started with pfSense, so that can be very little at times.

          1 Reply Last reply Reply Quote 0
          • E Offline
            error_account
            last edited by Feb 21, 2021, 6:52 PM

            @traveller I get a bit closer so Thank You :)

            1 Reply Last reply Reply Quote 0
            • C Offline
              Cino
              last edited by Feb 21, 2021, 7:24 PM

              @error_account Your best bet is to backup the DB (/var/db/vnstat/vnstat.db) and copy it over to your new install. I just did this yesterday and it worked like a charm. If you're custom to Windows, WinSCP is your friend.

              S 1 Reply Last reply Feb 22, 2021, 2:43 PM Reply Quote 0
              • S Offline
                S762 @Cino
                last edited by Feb 22, 2021, 2:43 PM

                @cino said in Traffic Totals backup how?:

                @error_account Your best bet is to backup the DB (/var/db/vnstat/vnstat.db) and copy it over to your new install. I just did this yesterday and it worked like a charm. If you're custom to Windows, WinSCP is your friend.

                I got one for you. Probably like most here I recently updated to 2.5, I think I started with 2.4.4 and did the subsequent updates. I have limited knowledge so when doing the prior updates I read that all packages should be uninstalled when updating. I removed my packages updated to 2.5 and reinstalled my packages but lost all my previous Traffic Totals history.

                Based on your post (and if I would have seen this before updating) I should have copied off the vnstat.db first. With Status-Traffic-Totals uninstalled there is no /var/db/vnstat/vnstat.db location, with it reinstalled its totals are new going forward with all past history gone. I searched with WinSCP for an old or backup copy of vnstat.db and none to be found. Does that sound about right?

                TIA

                C E 2 Replies Last reply Feb 22, 2021, 2:52 PM Reply Quote 0
                • C Offline
                  Cino @S762
                  last edited by Feb 22, 2021, 2:52 PM

                  @s762 I'm guessing when you manually uninstalled the packages, it removed the DB with it :-(

                  S 2 Replies Last reply Feb 22, 2021, 3:44 PM Reply Quote 1
                  • S Offline
                    S762 @Cino
                    last edited by Feb 22, 2021, 3:44 PM

                    @cino yes, like it was never there. oh well live & learn. Thanks for the post, I'll be on top of it next time

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      error_account @S762
                      last edited by Feb 23, 2021, 7:36 AM

                      @cino Thank You :)

                      @s762 I didn't saw this "uninstall-update-reinstall" procedure before so thank you for the tip :)
                      I just wanted to try some modifications (for testing) in the pfsense settings and I wanted to make a backup for when I'm finished just restore to the original state, and after this restore I saw all stats are gone :(

                      1 Reply Last reply Reply Quote 1
                      • S Offline
                        S762 @Cino
                        last edited by Mar 21, 2021, 11:17 PM

                        @cino
                        I repeated the process today to upgrade from 2.5 to 2.5.1 RC but this time I made a copy of vnstat.db and replaced the newly created DB and all went well. Thanks again for the info

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received