How to Create PAR or PCA Files on the Command Line

Similar documents
Cisco Edge 340 User Manual

Performing Administrative Tasks

Troubleshooting. Contacting Cisco TAC. Checking the Version Number of Cisco Configuration Engine APPENDIXA

Chapter 6. Linux File System

Lab E2: bypassing authentication and resetting passwords

System Manager Unit (SMU) Hardware Reference

Lab Working with Linux Command Line

RocketRAID 231x/230x SATA Controller Debian Linux Installation Guide

Build your own NAS with OpenMediaVault

GIGABYTE. Software Reference Guide for MP30 (APM) Platform R01. Document Version:

ELE409 SPRING2018 LAB0

3 Connection, Shell Serial Connection over Console Port SSH Connection Internet Connection... 5

Ellipse Support. Contents

CS CS Tutorial 2 2 Winter 2018

Back Up and Restore Cisco DNA Center

RocketRAID 2522 SATA Controller Ubuntu Linux Installation Guide

2 Bay 3.5 HDD SATA NAS Media Server Setting...20 Bonjour...21 TorrentFlux Maintenance...25 Disk Utility...25 RAID Setting...

RocketRAID 231x/230x SATA Controller Fedora Linux Installation Guide

How to Back-Up a fit-pc2 Using Only a USB Stick (and some creative partitioning)

RocketRAID 231x/230x SATA Controller Red Hat Enterprise/CentOS Linux Installation Guide

CompTIA Linux+ Guide to Linux Certification Fourth Edition. Chapter 2 Linux Installation and Usage

NETW 110 Lab 4 Using eth0 Configuration Mounting Drives and Devices Page 1

OpenSwitch OPX Installation Guide. Release 2.1.0

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

The Microdrive and CF card are electrically compatible this means that a CF card reader can be used to program a Microdrive.

Performing Maintenance Operations

Cross-compilation with Buildroot

ESS Linux Sys Admin - Guide to running ESS from the AWS AMI

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

Veritas System Recovery 18 Linux Edition README

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

Quick Start Guide V NLX-miniUCS APPLIANCE Unified Communications Server

RocketRAID 2680/2684 SAS Controller Red Hat Enterprise/CentOS Linux Installation Guide

RocketRAID 2310/2300 Controller Fedora Linux Installation Guide

Upgrade Cisco Interface Module for LoRaWAN IXM using the Console

CS Fundamentals of Programming II Fall Very Basic UNIX

RG-MACC_2.0 Installation Manual

Ubuntu Linux Installation Guide

INSTALLATION. Security of Information and Communication Systems

Kodaro s Niagara 4 Port Installation Guide

Managing the Cisco APIC-EM and Applications

XL-NAS-400SA. User s Guide

Fedora Linux Installation Guide

Z-Stack Linux Gateway Quick Start Guide Version 1.0

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Reset the Admin Password with the ExtraHop Rescue CD

OpenSwitch OPX Installation Guide with Enhancement Package. Release 2.1.0

File Transfers. Contents

ZENworks 2017 Update1 Full Disk Encryption Emergency Recovery Reference. July 2017

The KBackup Handbook. Martin Koller

Barracuda NextGen Report Creator

DGS-3630-Series Switches

TestOut PC Pro - English 6.0.x COURSE OUTLINE. Modified

CENG 334 Computer Networks. Laboratory I Linux Tutorial

LOG ON TO LINUX AND LOG OFF

ZBG 100 Gateway Recovery Guide Version 02 ZBG pikkerton GmbH ZBG Gateway Recovery Guide.docx Page 1/11

Adobe Marketing Cloud Using FTP and sftp with the Adobe Marketing Cloud

Perform Backup and Restore

Perform Backup and Restore

INSTALLATION. Security of Information and Communication Systems. Table of contents

Several additional changes are provided with this APAR.

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

Parallel Programming Pre-Assignment. Setting up the Software Environment

USING NGC WITH GOOGLE CLOUD PLATFORM

Booting a Galaxy Instance

Upgrade, Backup, Restore, and Reset Guide for Access Gateway Enterprise Edition

PF31XX FAMILY FIRMWARE UPDATE GUIDE. v1.2 Revised Nov 29, 2016

DICKEY-JOHN GAC 2500-UGMA PRODUCT CALIBRATION DOWNLOAD

Bitnami Tiny Tiny RSS for Huawei Enterprise Cloud

Upgrading the Server Software

About Backup and Restore, on page 1 Supported Backup and Restore Procedures, on page 3

RG-MACC-BASE_v2.01. Installation Guide

CST8207: GNU/Linux Operating Systems I Lab Nine Disks, Partitions, and File Systems Part 2. Disks, Partitions, and File Systems - Part 2 of 2

MAGENTO 2 INSTALL EXTENSION MANUALLY

How to Restore Windows Server 2008 Domain Controller System State

Notes on Using Red Hat Enterprise Linux AS (v.4 for EM64T)

This tutorial will guide you how to setup and run your own minecraft server on a Linux CentOS 6 in no time.

IT341 Introduction to System Administration. Project 4 - Backup Strategies with rsync and crontab

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Assignment 1: Build Environment

Upgrade Instructions. NetBrain Integrated Edition 7.0

Upgrading Software and Firmware

Upgrade Guide Version 7.2

Installing HMC in VirtualBox or VMWare - AIXWiki

Once your USB drive is formatted for the FAT32 file system it can be mounted and tested on the GESBC To do this, use the following command:

Author A.Kishore/Sachin WinSCP

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

alcasar_documentation Documentation

Linux Survival Guide

Fedora Linux Installation Guide

Computer Center, CS, NCTU. Outline. FreeBSD version 9.0-RELEASE 9.1-RC1. Installing FreeBSD. From CD-ROM From USB

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Com.X HTTP CDR and Recording Retrieval. Specification. Version 1.0, 4 March Far South Networks

System Management Unit (SMU)

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

LENS Server Maintenance Guide JZ 2017/07/28

Notes on Using Red Hat Enterprise Linux AS (v.3 for x86)

Wallet Installation Guide for Staking on Raspberry PI

Upgrade Guide for Cisco Digital Media System Release 5.0

SP40Plus Flash Memory Dow nload Procedure

Transcription:

How to Create PAR or PCA Files on the Command Line Use the phionar tool to back up the configuration of a single Barracuda NextGen Firewall F-Series or Barracuda NextGen Control Center. A cron job can be used to automate the configuration backups. Always keep PAR or PCA files of a functioning configuration for all your firewalls and Control Centers in a secure location. Create an Unencrypted box.par File Enter the following command to create a complete, unencrypted archive of the current configuration: cd /opt/phion/config/configroot/ /opt/phion/bin/phionar cdl /backuppath/box.par * Create an Encrypted box.pca File PCA files can be created by using the serial number as the password, or by specifying a manual password. PCA files are available for firmware 6.0.1 or later. PCA files created for NextGen Firewalls running version 6.0.0 on an Control Center must be decrypted manually. For more information, see phionar and conftool. Using a Manual Password Enter the following command to create a complete encrypted archive of your configuration with a custom password: cd /opt/phion/config/configroot/ /opt/phion/bin/phionar cdl -P YOURPASSWORD /backuppath/box.pca * Using the Serial Number as the Password Enter the following command to create a complete, encrypted archive of your configuration by using the serial number as the password for the archive. cd /opt/phion/config/configroot/ /opt/phion/bin/phionar cdl -Q /backuppath/box.pca * Decrypting a PCA file Virtual and Public Cloud appliances can only be restored by using unencrypted PAR files. To decrypt the PCA file, you can use phionar on a Barracuda NextGen Firewall F-Series or OpenSSL on any Linux or Windows host. For more information, see phionar and conftool. Create an archive.par PAR file To create an archive of a Barracuda NextGen Control Center, enter the following commands: cd /opt/phion/rangetree/ /opt/phion/bin/phionar cdl /tmp/archive.par./configroot/* Please note that the archive.par file does not contain Firewall Secure Connector configurations of the Control 1 / 7

Center. Please use the configuration backup feature of Barracuda NextGen Admin instead. Example backup script The following table contains an example backup script that can be used to back up the configurations on a Control Center. Modify this script to use encrypted archives for firewalls with version 6.0.1 or later. Basic script for Control Center This script creates an archive.par and box.par for a NextGen Control Center. This script does not verify the upload and also does not write to a log file. #!/bin/bash #echo "Backup-Script for Barracuda NextGen Firewall F-Series" #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 <<END_SCRIPT quote USER $USER quote PASS $PASSWD cd $DSTPATH binary 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 rm -f /root/${filename1} rm -f /root/${filename2} exit 0 Advanced backup script 2 / 7

This backup script creates a PAR file for a NextGen Firewall and uploads it via FTP. The upload is verified and the backup is logged to /tmp/par_ftpbackup.log. Click here to see the advanced backup script... #!/bin/bash # # ftp server credentials # # HOST='192.168.0.16' USER='USERNAME' PW='PASSWORD' FILENAME=box_`date +%e_%b_%y %H\UHR%M`.par LOGFILE=/tmp/Par_FTPbackup.log # Functions gen_event() { /etc/phion/bin/events --type_id="131" --type_name="logfile FTP backup" --layer_id="1" -- layer_name="box" --class_id="1" --class_name="storage" --data="logfile FTP backup unsuccessful" } ftp_conn () { local i=$* # Call 1. Uses the ftp command with the -in switches. -i turns off interactive prompting. -n Restrains FTP from attempting the auto-login feature. /usr/bin/ftp -in $i > /tmp/ftp.worked 2> /tmp/ftp.failed <> ${LOGFILE} echo "FTP transfer failed" >> ${LOGFILE} elif [! -f retrieval.$$ ] then gen_event 3 / 7

else return fi } cleanup() { #rm -f /tmp/${filename} rm -f /tmp/retrieval.* rm -f /tmp/ftp.worked rm -f /tmp/ftp.failed } date >> ${LOGFILE} echo "Creating Par backup" >> ${LOGFILE} # par file creation cd /opt/phion/config/configroot/ sleep 5 /opt/phion/bin/phionar cdl /tmp/${filename} * sleep 10 echo "Trigger FTP Connection" >> ${LOGFILE} # Actually triggers the backup ftp_conn $HOST echo "Garbage Collection" >> ${LOGFILE} 4 / 7

# Garbage Collection cleanup echo "Backup Completed on `date +%Y\ %m\ %d\ %T`">> ${LOGFILE} exit 0; Emergency restore In case of a severe misconfiguration, you can perform an emergency restore with a PAR or PCA file containing a working configuration. You can perform the restore by USB stick or via SSH shell. Barracuda Networks recommends performing emergency restore via USB stick for hardware appliances. Restore for hardware appliances using an USB stick 1. Retrieve the box.par or box.pca file with the last working configuration and copy it to a USB flash drive. Plug the USB stick into the affected system. 2. Identify the storage device label for the USB flash drive. Enter fdisk -l to locate the USB flash drive on the Barracuda NextGen Firewall F-Series or Control Center. The device label may vary depending on the Barracuda NextGen Firewall F-Series model. If you use a SATA, SCSI or a RAID controller, the sda1 partition is already in use. In this case, the USB flash drive will use the next free device label. E.g., /dev/sdb1 USB sticks are typically formatted with FAT32. Check the System column for W95 FAT32 (LBA) to help you identify the USB stick formatted with FAT32. 3. Log into the Barracuda NextGen Firewall F-Series 4. Mount the USB stick and copy the PAR or PCA file by entering the following commands (Replace /dev/sdb1 with the storage device from the previous step): mkdir /mnt/usb modprobe usb-storage mount -t vfat /dev/sdb1 /mnt/usb cp /mnt/usb/box.par /opt/phion/update/ umount /mnt/usb 5. If you are restoring the configuration with a PCA file created with the -P option, or the serial number used as the password of the PCA file does not match the appliance, decrypt the file by using the following command: phionar D -P YOURPASSWORD myarchive.pca myarchive.par 6. Restart the phion service to initiate the emergency restore: 7. /etc/rc.d/init.d/phion stop /etc/rc.d/init.d/phion start Use ifconfig to verify the system interfaces and IP addresses are configured as expected. Emergency restore via SSH If you can reach your Barracuda NextGen Firewall F-Series via SSH, you can also perform an emergency restore via SSH. 1. If necessary, rename the PCA or PAR file to box.par or box.pca. 5 / 7

2. Copy the box.par or box.pca file to the /opt/phion/update/ directory on the Barracuda NextGen Firewall F-Series. 3. If you are restoring the configuration with a PCA file created with the -P option, or the serial number used as the password of the PCA file does not match the appliance, decrypt the file using the following command: phionar D -P YOURPASSWORD box.pca box.par 4. Restart the phion service to initiate the emergency restore: /etc/rc.d/init.d/phion stop /etc/rc.d/init.d/phion start For more information, see How to Back Up and Restore Your Systems. 6 / 7

7 / 7