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

Backup / restore config.xml on the command line

Scheduled Pinned Locked Moved General pfSense Questions
3 Posts 3 Posters 6.7k 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.
  • R
    ren22
    last edited by Sep 29, 2015, 12:58 PM

    Hi,

    is there any command to backup or restore the config.xml on the command line?
    I mean if i only want the config.xml and the not the package configuration as example.

    thanks

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Sep 29, 2015, 7:41 PM

      There isn't a way to filter out the package info from the command line (well, easily… there probably is with a piped chain of various shell commands)

      You can just grab the config.xml from /conf/ and cp/scp/etc it wherever you want. If you want to remove the package settings, just edit out the " <installedpackages>...</installedpackages> " section of the configuration.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • M
        muswellhillbilly
        last edited by Sep 30, 2015, 7:36 AM

        I run a cron job to backup my config.xml to a local ftp server. Example below:

        #!/bin/sh
        cd /conf
        cat <<end |="" ftp="" 'ftp:="" login:password@ftp.server.com="" backup'<br="">put ./config.xml
        END

        To restore, just run a manual ftp session to the backup server and pull down the last good config, removing the package info as jimp suggests.</end>

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received