Barracuda CloudGen Firewall

How to Create PAR Files with the Line https://campus.barracuda.com/doc/12198583/

Use the phionar tool to back up the configuration of a single appliance or the configurations of appliances on a Barracuda NG Control Center. A job can also be used to automate the configuration backups. Store the archive files on a separate computer.

Create a box.par file

To create a complete archive of an appliance configuration, enter the following commands:

/opt/phion/config/configroot/ phionar cdl /backuppath/box.par *

The following example is a backup script that can be used to back up the configurations on a Barracuda NG Control Center.

#!/bin/bash ######################### # "Backup-Script for Barracuda NG Firewall" #echo "------" #echo "Creation of archive files" #echo "ftp or scp -transfer onto 10.0.0.1" #echo "------" HOST='10.0.0.1' USER='yourusername' PASSWD='yourpassword' DSTPATH='/root/' FILENAME1=CC-tree_`date +%Y_%m_%d_%H_%M`.par FILENAME2=CC-box_`date +%Y_%m_%d_%H_%M`.par cd /opt/phion/maintree/ /opt/phion/bin/phionar cdl /root/${FILENAME1} configroot/* history/* cd /opt/phion/config/configroot/ /opt/phion/bin/phionar cdl /root/${FILENAME2} * ######################### # Example of ftp: cd /root/ ftp -n $HOST <

How to Create PAR Files with the Command Line 1 / 4 Barracuda CloudGen Firewall

put ${FILENAME1} put ${FILENAME2} quit END_SCRIPT ######################### # Example of scp: Note: You have to exchange your keys with the destination! /usr/bin/scp /root/${FILENAME1} $USER@$HOST:${DSTPATH}/${FILENAME1} /usr/bin/scp /root/${FILENAME2} $USER@$HOST:${DSTPATH}/${FILENAME2} ######################### # Garbage Collection -f /root/${FILENAME1} rm -f /root/${FILENAME2} 0

Emergency Restore

For safety reasons, you should always store a box.par file containing the running configuration in a safe place.

In case of a severe misconfiguration (For example, the system’s online connectivity does not function properly), complete the following steps to restore the system:

1. Get the PAR

Retrieve the box.par file with the last working configuration and copy it onto a USB flash drive. Insert the USB flash drive into the affected system.

2. Log into the Barracuda NG Firewall and Copy the PAR File

Log in as root using your password and enter the following commands:

/mnt/usb modprobe usb-storage mount /mnt/usb /mnt/usb/box.par /opt/phion/update/ umount /mnt/usb /etc/rc.d/init.d/phion stop /etc/rc.d/init.d/phion start

If you use a SCSI or a RAID controller, the sda1 partition is probably already in use. In this case, the USB flash drive will use another label (e.g. sdb1). To view which label is being used, enter

How to Create PAR Files with the Command Line 2 / 4 Barracuda CloudGen Firewall

the mount -l command.

3. Verify the System IPs

Use the ifconfig command to verify that the system has the correct IPs and interfaces.

4. Reconnect to the System

Log into the system with Barracuda NG Admin.

You can also restore a box using shell access (SSH). Copy the box.par file to the /opt/phion/update/ directory and enter the following command as one line: /etc/rc.d/init.d/phion stop && /etc/rc.d/init.d/phion start

Create an archive.par file

To create an archive of a Barracuda NG Control Center, enter the following commands:

cd /opt/phion/rangetree/ /opt/phion/bin/phionar cdl /tmp/archive.par ./configroot/*

For recovery information see How to Back Up and Restore Your Systems.

How to Create PAR Files with the Command Line 3 / 4 Barracuda CloudGen Firewall

© Barracuda Networks Inc., 2021 The information contained within this document is confidential and proprietary to Barracuda Networks Inc. No portion of this document may be copied, distributed, publicized or used for other than internal documentary purposes without the written consent of an official representative of Barracuda Networks Inc. All specifications are subject to change without notice. Barracuda Networks Inc. assumes no responsibility for any inaccuracies in this document. Barracuda Networks Inc. reserves the right to change, modify, transfer, or otherwise revise this publication without notice.

How to Create PAR Files with the Command Line 4 / 4