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

    Fetch config with wget on pfSense 2.1

    Scheduled Pinned Locked Moved General pfSense Questions
    1 Posts 1 Posters 1.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.
    • J
      Jonic
      last edited by

      Hi guys,

      I'm trying to backup my config using the script from:
      https://doc.pfsense.org/index.php/Remote_Config_Backup
      (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?

      Thanks

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