Troubles with config backups in 2.3.1
-
Hello,
We have made quite a big leap upgrading from 2.2.3 to 2.3.1.
The delay was mainly caused by crashing dnsmasq daemon which has been fixed somewhere between version 2.2.6 and 2.3.1.Anyway - the problem I'm getting now is wget config backup that has stopped working.
I have modified my existing scripts following this official guide for versions 2.2.6+:
https://doc.pfsense.org/index.php/Remote_Config_Backup
The last wget command returns:
–2016-06-30 16:19:12-- https://x.x.x.x/diag_backup.php
Connecting to x.x.x.x:443... connected.
Unable to establish SSL connection.Both csrf.txt and csrf2.txt are empty and cookies.txt only contains:
HTTP cookie file.
Generated by Wget on 2016-06-30 16:03:16.
Edit at your own risk.
Please advise.
Thanks
Adam -
Guessing maybe the certificate validation is failing and you don't have wget set to not verify.
-
All three wget commands are executed with –no-check-certificate following the guide on pfsense docs.
The first two run without errors and only the last one seems problematic:
wget --keep-session-cookies --load-cookies cookies.txt --no-check-certificate --post-data "Submit=download&donotbackuprrd=yes&__csrf_magic=$(head -n 1 csrf2.txt)" https://x.x.x.x/diag_backup.php -O config-xxx-
date +%Y%m%d%H%M%S
.xmlError as in my original post above.
I suspected permission issues with creating / accessing .txt files but the same thing happens in /tmp folder which in general has no permission restrictions.
-
I still haven't found the answer but I agree it's likely to be wget related.
Maybe the pfsense guide needs to be verified and updated?
Why would the first two commands run without errors and the third one fail?
Why the files created are empty?
-
https://forum.pfsense.org/index.php?topic=112420.msg628764#msg628764
-
Thanks azekiel, your script has solved my problem.