Fetch config with wget on pfSense 2.1
Jonic last edited by
I'm trying to backup my config using the script from:
(the one for pfSense 2.0)
The login command works ok, the cookies.txt file gets created. The second one works also, but when I check the contents of the config-router-… file, it appears that what gets saved is the diag_backup.php file. Here's an excerpt from the downloaded file:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <title>Login</title> .....
Here's the second command I use:
wget --keep-session-cookies --load-cookies cookies.txt --post-data 'Submit=download&donotbackuprrd=yes' https://myserverhostname:81/diag_backup.php --no-check-certificate -O config-router-`date +%Y%m%d%H%M%S`.xml
I am using port 81, as this is the port set up on the web interface. The link works in a browser.
Has the syntax changed with 2.1, or do you have any ideas on what I am doing wrong?