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

    PfSense full backup

    General pfSense Questions
    3
    4
    6.5k
    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
      Ramosel
      last edited by

      During the last couple of system updates, I've opted to have the full backups created.  Output visible and can be managed at System:Firmware:Restore Full Backup.

      How does one invoke this pfsense-full-backup as a .tgz (vs. config as an .xml) when not doing a system update?  Or is this part of the Gold Membership?

      Rick

      1 Reply Last reply Reply Quote 0
      • C
        charliem
        last edited by

        Take a look at /etc/rc.create_full_backup and /etc/rc.restore_full_backup.

        [2.2-ALPHA][root@pfsense]/root(3): cat /etc/rc.create_full_backup
        #!/bin/sh
        
        FILENAME="pfSense-full-backup-`date "+%Y%m%d-%H%M"`.tgz"
        echo ">>> Creating full backup to /root/$FILENAME"
        tar czPf /root/$FILENAME \
                --exclude dev/* \
                --exclude tmp/* \
                --exclude var/db \
                --exclude var/run/* \
                --exclude root/* \
                --exclude var/empty/* \
                --exclude var/empty \
                --exclude var/etc \
                /
        
        echo ">>> Backup completed.  Note: this backup includes config.xml!"
        echo ">>> To restore this backup run this command:"
        echo "    /etc/rc.restore_full_backup /root/$FILENAME"
        
        
        1 Reply Last reply Reply Quote 0
        • pttP
          ptt Rebel Alliance
          last edited by

          https://forum.pfsense.org/index.php/topic,63938.msg346195.html#msg346195

          1 Reply Last reply Reply Quote 0
          • R
            Ramosel
            last edited by

            Awesome!  Thanks guys.

            Rick

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