Active voucher restore problem
-
@ishtiaqaj hi,
This is kind if anoying....sadly, there is no solution to your issue
The only good news is that this kind of issue should be fixed in 2.5.0 (support for reboots has been strongly improved on the captive portal). You wont have this issue anymore when it will be released
-
@ishtiaqaj said in Active voucher restore problem:
plz guide in this regard..
See it as a feature.
Normally, you'll have to compensate the down time introduced during the hardware failure.
This is done by re-initing the used time of the activated vouchers.Btw : you could also consider backing up the files used to keep track of activated vouchers :
You will find files like these
in the /var/db/ folder.
( this is some what undocumented - and I never tried it out myself - as I'm quiet happy about the feature mentioned above as it is )
-
@Gertjan
is there any solution for this "to restore active voucher with timestamp"
plz somebody help i have almost 1500 active users..Regards,
-
As said : back them up.
Or do something about that hardware failure. -
@Gertjan i have backup on regular basis but problem is whenever has to restore due crash or changing server...
-
@ishtiaqaj said in Active voucher restore problem:
has to restore due crash or changing server...
Try to solve that issue.
I've my pfSense working for months or ùore, and if I need to restart it, it's for my own reasons.I do understand you question. yet you are the first asking for a voucher_active_1.db and voucher_used_1.db backup.
And you're right, normally, after a config.xml import the entire pfSense should be back to operational, as before a hardware crash. Except for caches and that kind of stuff.
And these two files ..... -
@Gertjan
you means to say i have to backups these two files?? -
Exact.
These two files control the state of activated vouchers.
Never tried it out myself though, rebuilding a pfSense setup doesn't happen often. Ones every 5 years or so ?And when I would have 1500+ users I would make a random voucher code generator that would be fed into a FreeRadius, it's user database. Ones logged in, it will time out after a one shot duration of the 'voucher'.
Less hassle - Radius is build to do things just like this.The radius database could be backed up easily (a classic MySQL or Maria database)
-
@Gertjan plz can u guide how can i backup these two files daily basis
i have more than 1500 active vouchers -
@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.
-
@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..
-
@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.
-
@Gertjan but it is working with me since 2 years now.
just want to update and with later versions it is not working
-
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. -
@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
-
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. -
@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..
-
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.
-
@Gertjan in which directly these files are located i am trying to search these file with winscp software but unable to find..
-
??
Look at my first reply.