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.0k Views
    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
      error_account
      last edited by

      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 Reply Quote 0
      • T
        Traveller @error_account
        last edited by

        @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 Reply Quote 0
        • E
          error_account @Traveller
          last edited by

          @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 Reply Quote 0
          • T
            Traveller @error_account
            last edited by

            @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
              error_account
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • C
                Cino
                last edited by

                @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 Reply Quote 0
                • S
                  S762 @Cino
                  last edited by

                  @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 Reply Quote 0
                  • C
                    Cino @S762
                    last edited by

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

                    S 2 Replies Last reply Reply Quote 1
                    • S
                      S762 @Cino
                      last edited by

                      @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
                        error_account @S762
                        last edited by

                        @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
                          S762 @Cino
                          last edited by

                          @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.