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

    Active voucher restore problem

    Scheduled Pinned Locked Moved Captive Portal
    30 Posts 4 Posters 2.4k 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.
    • GertjanG
      Gertjan
      last edited by

      @ishtiaqaj said in Active voucher restore problem:

      @Gertjan plz can u guide how can i backup these two files daily basis

      With that many users using vouchers you should have a fail-over system, that is : two pfSense's working in a master-slave configuration. That will be your primary backup.

      Getting a file on and off a pfSense system : we all use a SFTP like Fiezilla, or far better : SmartFTP. The latter can be automated. Activate the SSH port 22 console access, and you're in.

      The best answer would probably be : how good is your Windows scripting ? or MAC, or Linux, what ever you use on your PC, or the device where you want to backup to.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • I
        Iahmad
        last edited by

        @Gertjan i am not expert user how ever i want to save in window pc. i am still running 2.4.2 because i have script to backup on daily basis and 2.4.2 can restore active voucher whenever there is crash with little modification in voucher. inc

        but i want to upgrade to latest version i tried on virtual machine to restore on latest restore doesn't work..

        GertjanG 1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @Iahmad
          last edited by

          @ishtiaqaj said in Active voucher restore problem:

          i have script to backup on daily basis

          What script ? Backing up what ?
          pfSense crashes ????

          @ishtiaqaj said in Active voucher restore problem:

          but i want to upgrade to latest version i tried on virtual machine to restore on latest restore doesn't work..

          Does not work ?
          That's all the info you have ?

          The config.xml file can be loaded into another machine, but interface (driver) names like em0, fxp0 or re1 will not be the same. You have to attribute interfaces and match their names first.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • I
            Iahmad
            last edited by

            @Gertjan but it is working with me since 2 years now.

            just want to update and with later versions it is not working

            1 Reply Last reply Reply Quote 0
            • GertjanG
              Gertjan
              last edited by

              2.4.5 is not working for you ?
              It doesn't install ? Portal ? You have new issues because you don't know how to set up a virtual machine ? What ?

              I'm using the portal right now, using 2.4.5, and it works as before.

              Ok, true, I'm not using vouchers, just a portal that is FreeRadius based.
              Voucher do work when I activate them.

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              I 1 Reply Last reply Reply Quote 0
              • I
                Iahmad @Gertjan
                last edited by

                @Gertjan thats good but in my case i am using vouchers so plz guide me how can i backups files on daily basis

                so i can restore them

                1 Reply Last reply Reply Quote 0
                • GertjanG
                  Gertjan
                  last edited by

                  As said above : use what looks like the console access, activate SSH, and a program like FileZilla. It will be a click click click procedure to backup (edit, copy, move) any file in the pfSense file system.
                  Billions of people that maintain internet sites or other remote system already use them.
                  It's not rocket science.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  I 1 Reply Last reply Reply Quote 0
                  • I
                    Iahmad @Gertjan
                    last edited by

                    @Gertjan sorry but i want to ask u can i do this in such way that everyday automatically it copies files at some specific time..

                    1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan
                      last edited by

                      Of course.
                      The question is : do you really want to ?

                      As said above, I use a Windows program (see link above) to retrieve the config.xml every day at 16h00.
                      The Windows task scheduler start it every day at 16h. Works very well.

                      It could have been done with some scripting, I guess. I never studied that Windows Power Scripting shell myself (it's a pain in the xxxxx and I never had any need for it).

                      Another idea : you have a USB thumb disk ? Your pfSense has a USB port ?
                      Learn how to insert that USB disk .... and mount it.
                      Now, write a simple cron task that copies the files, and while doing so renaming it by adding the date like "20200423_" in front of it.
                      The USB disk could MSDOS or FAT32 formatted. This format can be mounted and read/write by pfSense.

                      Btw : a VM would allow you to clone the VM easily. So you have a spare copy.

                      Or : something I would do : repair your setup => it won't crash any more. No more unhappy clients, no more hassle, no more need to repair things.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • I
                        Iahmad
                        last edited by

                        @Gertjan in which directly these files are located i am trying to search these file with winscp software but unable to find..

                        1 Reply Last reply Reply Quote 0
                        • GertjanG
                          Gertjan
                          last edited by

                          ??

                          Look at my first reply.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          1 Reply Last reply Reply Quote 0
                          • I
                            Iahmad
                            last edited by

                            @Gertjan sorry i find the files now looking to backup daily at specific time without my presence

                            1 Reply Last reply Reply Quote 0
                            • I
                              Iahmad
                              last edited by

                              @Gertjan i tried to restore with database file and its works perfectly and restore the active cards.
                              i used winscp tool

                              now guide me how can it do backup automatically

                              1 Reply Last reply Reply Quote 0
                              • I
                                Iahmad
                                last edited by

                                But @Gertjan everytime i creat new roll there will be new database file in /usr/var/db
                                how can i copy or update all the time please help me..

                                it going difficult me

                                1 Reply Last reply Reply Quote 0
                                • GertjanG
                                  Gertjan
                                  last edited by

                                  @ishtiaqaj said in Active voucher restore problem:

                                  now guide me how can it do backup automatically

                                  WINSCP can't be automatized. It's a click an pray program.

                                  You'll be needing a "home made" script file.
                                  hings would be really easy if pfSense could send mails with attachments.
                                  In the past, pfSense used phmailer, the famous mail with PHP project, but it's abandoned now.
                                  See here /etc/inc/phpmailer/ - several files are missing (but you could repopulate them).

                                  Or use what my grand father used : rsync - which is the tool for the task.

                                  This could be a solution : visit this forum : https://forum.netgate.com/category/30/bounties

                                  No "help me" PM's please. Use the forum, the community will thank you.
                                  Edit : and where are the logs ??

                                  1 Reply Last reply Reply Quote 0
                                  • I
                                    Iahmad
                                    last edited by

                                    @Gertjan i was checking config.xml file there are active voucher with timestamp before i made some changes in voucher.inc prior to restore and it restores the active cards upto versions 2.4.3. later versions not restores... can you look for this may be we can restore with some changes from voucher.inc

                                    1 Reply Last reply Reply Quote 0
                                    • GertjanG
                                      Gertjan
                                      last edited by

                                      I do not have 2.4.3 - neither a working system with vouchers.

                                      No "help me" PM's please. Use the forum, the community will thank you.
                                      Edit : and where are the logs ??

                                      1 Reply Last reply Reply Quote 0
                                      • I
                                        Iahmad
                                        last edited by

                                        @Gertjan i was sharing my experience with you

                                        1 Reply Last reply Reply Quote 0
                                        • viktor_gV
                                          viktor_g Netgate
                                          last edited by

                                          This post is deleted!
                                          1 Reply Last reply Reply Quote 0
                                          • viktor_gV
                                            viktor_g Netgate
                                            last edited by

                                            https://redmine.pfsense.org/issues/3128

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.