You are on page 1of 37

PBX IN A FLASH DEVELOPMENT CORPORATION

PIAF Dev Corp
Digitally signed by PIAF Dev Corp DN: cn=PIAF Dev Corp, o=PBX in a Flash Development Corporation, ou=Executive, email=support@piafdevcorp.com, c=US Date: 2011.03.25 11:17:22 -04'00'

Backing up your PBX in a Flash 1.7.5.5 installation on a daily basis
PIAF Development Corporation Mar 25, 2011

Daily Backup

A manual to install, configure, and use a daily backup program on PBX in a Flash 1.7.5.5

Welcome! This document will describe the configuration and installation of the daily backup package onto PBX in a Flash 1.7.5.5 We have tested this script on Lab, Production, Real, and Virtual machines; using both VMware and Proxmox with great success. This is version 1.7.5.5 of the program released March 25, 2011 This work is copyright 2007 – 2011 by the PBX in a Flash Development Corporation. This work may not be altered or modified without express written permission of the author. You may copy this manual and use it freely; however this notice must be included with the document. This manual is NOT released under the GNU General Public License. Whole Disk Backup is designed and licensed to only run under PBX in a Flash. Use of this program under any other PBX system is a violation of our license.

Daily Backup

March 2011

WARNINGS Please contact us in the PBX in a Flash forum for further information.

As with any new piece of software you need to ensure it actually works in your own computer environment. If you fail to test this software on your production machine and you rely on it to do mission critical backups YOUR BACKUP OR RESTORE WILL FAIL. What does this mean? It means that without testing on your own hardware the Daily Backup program may not work at all.

© Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved

Page 2

OVERVIEW

Daily Backup

March 2011

The need to have software backups on a daily basis is a requirement that has been lacking in most installations of PBX systems. When a PBX installation fails due to software problems there has to be a way to quickly and accurately repair or restore the errant piece of software. To this end a daily backup program was created. This program is run by cron every morning about 4am and will make backups, using various methodologies, of critical files that are essential to running PBX in a Flash 1.7.5.5. Once these backup procedures have been completed a single master archive will be created and then optionally move offsite. Upon completion a complete report will be emailed to the user of your choice. Daily-backup also offers the ability to move the master archive to offsite storage via FTP, SMB, Attached USB flash/hard drive, and copy to a Pogo Plug. Rsync is also supported for selected transport mechanisms. METHODOLOGY The “Kitchen Sink” approach was chosen to make daily backups as opposed to a single method of storing critical system information. This provides the user with extra flexibility when it comes to restoring critical aspects of PIAF 1755 where a complete bare metal restore may NOT be required. For example: a single table in MySQL becomes corrupted you can simply restore from the MySQL dump which is stored in the master archive. Once you have configured the /etc/pbx/daily-backup.conf file cron will run /etc/cron.daily/diskbackup.cron at about 0400 hours. The program will read the configuration file and proceed to call various backup methods and then store the results in a single master backup file. The current methods for backing up PBX in a Flash 1.7.5.5 are: Original FreePBX backup, Complete dump of MySQL, Incredible backup, and a separate archive of any digium licenses. In order to restore please follow the appendixes in the back of this document. NOTE: Some of these appendixes have yet to be written and require a high degree of Linux awareness. Unfortunately this is beyond the scope of this manual.

© Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved

Page 3

We use joe as our command line editor. It is recommended you follow the directions in Appendix one to delete the existing file system and redo it with the Linux version of fdisk and mkdosfs.7.REQUIREMENTS Daily Backup March 2011 There are several requirements to run the disk backup script and they are outlined below. Various pieces of information that you will require in order to make the file transfer methods you have selected work. Access to a shared drive on a Windows/Samba server with sufficient privileges to read and write files Access to a Pogo Plug share o o o o © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 4 . Simply fill the information for the method of storage you have selected. It is recommended you have met all of the requirements prior to performing the installation and configuration.5 ONLY A command line editor you are comfortable with on your PBX in a Flash.7. Below is a table of all of the required information.5. By default ftp is enabled and USB/SMB is disabled.5 installation. A least one of the following o o An ftp account on a remote system that you can log into and upload files A USB stick of sufficient size locally attached to your PBX in a Flash. o A working PBX in a Flash 1. Note this software is designed to work with PBX in a Flash 1.5.

Configuration Options VARIABLE NAME Default Value User provided value Description MASTER SWITCH This controls if the program is processed.conf file is fully configured. CONFIGURED “0” VARIABLE NAME Default Value SENDLOG “1” DELBACKUPS “1” © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 5 . 0 = DISABLED You need to change this to “1” after you have configured the /etc/pbx/disk-backup. 0 = Do not email log 1 = Email log This option causes the ISO files that have been created to be deleted AFTER they have been copied to offsite storage.conf file User provided value Description This switch instructs the program to email the log file to a email address specified in /etc/pbx/emailscript.conf and /etc/pbx/script-email.Information Tables to be filled out prior to Installation Daily Backup March 2011 These settings are contained in /etc/pbx/daily-backup.conf There is another option later in the configuration file to gzip the log file prior to sending it. When the program is installed the default setting is to disable daily backups until the /etc/pbx/daily-backup.conf. 0 = Do not delete local copy of ISO file 1 = Delete local copy of file DIRECTORY “/backup” Do not change! This is where the ISO files are created.

Incredible Backup Configuration VARIABLE NAME Default Value User provided value Description Daily Backup March 2011 This option tells the program to process a daily backup via the Incredible Backup methodology IBACK “1” 0 = Do not use Incredible Backup 1 = Use incredible Backup MySQL Database backup VARIABLE NAME Default Value User provided value Description This option tells the program to perform a MySQL dump of all tables DBBACK “1” 0 = Do not use the MySQL dump procedure 1 = Use the MySQL dump procedure DBNAME DBPASS “root” “passw0rd” DO NOT CHANGE DO NOT CHANGE Should not have to be changed Should not have to be changed © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 6 .

Do not modify unless you know what you are doing. See the file for details.FreePBX Backup VARIABLE NAME Daily Backup Default Value User provided value Description March 2011 This option tells the program to perform a FreePBX Backup of the system FPBXBACK “1” 0 = Do not backup the system using the freepbx method 1 = backup the system using the freepbx method This option removes the freepbx generated archive located in /var/lib/asterisk/backups/piafbackup REMFILES “1” 0 = Do not remove files 1= Remove files Options See Appendix This allows you to specify what the FPBX program will backup. Digium License Backup VARIABLE NAME Default Value User provided value Description This option tells the program to copy any Digium license located in /var/lib/digium LICBACKUP “1” 0 = Do not backup Licenses 1 = backup Licenses DIGIUMLIC "/var/lib/digium" DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING! This is the path currently to where the digium licenses for thing like g729… are stored © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 7 .

server.ip” This is the username that you use to log onto the remote ftp server This is the password used to log onto the remote ftp server This is the remote ftp directory you wish the backup files to be placed minimum is / This is the IP address or Fully Qualified Domain Name of the ftp server © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 8 .Ftp Information Daily Backup User provided value March 2011 VARIABLE NAME Default Value Description Once the ISO’s have been created by Mondorescue copy them to an ftp store CPFTP “0” 0 = Do not copy to ftp share 1 = Copy to ftp share USERNAME PASSWORD REMOTEDIRECTORY SERVER “ftpuser” “ftppassword” “/” “ftp.

Default is /dev/sda1 *Usually works in most cases VARIABLE NAME CPFLASH “0” USBMOUNTPOINT= “/mnt/usbmondo” USBDEVICENAME= “/dev/sda1” Please see Appendix one for the complete procedure to configure your USB drive to work before filling out the table above. © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 9 .Usb drive info Daily Backup Default Value User provided value March 2011 Description Once the ISO’s have been created by Mondorescue copy them to an external USB Hard/Flash drive 0 = Do not copy to USB hard/flash drive 1 = Copy to USB hard/flash drive It is recommended you DO NOT change this Where the flashdrive is mounted to default is /mnt/usbmondo This is the device name of your USB stick and may change depending on what you find using dmesg.

5” SMBSHARE= “sharename” LOCALMOUNT= “/mnt/smbmondo” SMBUSER= SMBPASS= “user” “pass” © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 10 . NOTE don’t change thus unless you understand how.Smb Share Information VARIABLE NAME Default Value User provided value Description Daily Backup March 2011 CPSMB “0” Once the ISO’s have been created by Mondorescue copy them to a SMB share on the network 0 = Do not copy to network share 1 = Copy to network share This is the ip Address of the machine that is sharing a folder. SMBMACHINE= “192. NOTE you must have sufficient privileges on the remote machine to read/write/modify It is recommended you DO NOT CHANGE THIS! This is the local folder that the remote SMB share is mounted to.1. This is your username on the remote Windows/Samba machine This is your password on the remote Windows/Samba machine.168. This machine can be windows based or any operating system that can run SAMBA server This is the share name on the remote window/Samba machine.

We tested it with a space in the name however it is recommended you do NOT use spaces or any special charaters in the directory name Page 11 PNAME "test1234@nowhere. This can be changed on the web based configuration # my. NOTE it is recommended you change the name of the shared hard drive to something without spaces in it.com This is the destination directory on the Pogo Plug.pogoplug.Pogo Plug Information VARIABLE NAME Default Value User provided value Daily Backup March 2011 Description Once the ISO’s have been created by Mondorescue copy them to a network based Pogo Plug 0 = Do not copy to the Pogo Plug 1 = Copy to the Pogo Plug CPPOGO “0” PMOUNT "/mnt/pogoplug" This is the local mount for Pogo Plug It is recommended you do NOT change this This is the username to log into a Pogo Plug.com" PPASS "password" POGOROOT "16gbflash" POGOPATH "test 15" © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved . If it does not exist it will be created. Spaces in the hard drive name can lead to unexpected results. Note it should be in the form of an email address This is password used in conjunction with username to log into a Pogo Plug This is the name of the hard drive on the Pogo Plug you wish to use.

If enabled it will be used on all enabled methods except for ftp. The log files can become very large and be rejected by mail servers. After the first time only the deltas (changes) are copied to the remote storage device. Generally this takes less time to do the copy. This is only effective if sending of logs via email is enabled (as above) GZIPPEE “0” © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 12 . except for the first iteration. 0 = Do not use rsync 1 = Use rsync Gzip information VARIABLE NAME Default Value User provided value Description With this option gzip will compress the log file prior to emailing it to the designated recipient.Rsync information VARIABLE NAME Default Value User provided value Description Daily Backup March 2011 USYNC “0” This will allow the ISO files to be copied to the destination via rsync.

conf VARIABLE NAME Default Value User provided value Description Place your own email address here. Many of PIAF support programs now use this file in order to ascertain if log files are to be sent and to whom the email goes to. With this setting you can tell the application to always send a copy of the logs to the addressee. This file now resides in /etc/pbx and is called script-email. 0 = Do not email the logs 1= Send the application logs via email. enclosed in double quotes. NOTE This feature will only work if you have your sendmail/postfix configured to send email outside of your PBX in a Flash system.Email configuration Daily Backup March 2011 The configuration of sending automated emails for log files was moved to a separate configuration file. Please don’t ask for help on configuring your sendmail/postfix. EMAIL= “root@localhost” USEEMAIL “1” © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 13 . If you leave it the default it will send the log files to the root account. You must test your sendmail/postfix install by sending a test message outside of your PBX in a Flash system.

or Pogo Plug.PROCEDURE Daily Backup March 2011 In order to install daily-backup. 3. 2. This may take a while. If you are going to use a USB memory stick I recommend it be at least 8gb in size. Start it running and go away for lunch! © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 14 . You may choose one or all of them. By default ftp is enabled but you can also choose to use USB hard/flash drive.cron script by “hand”. 5. (Hereinafter called the CLI) This document contains screen captures and step by step instructions so the installation should not present too many difficulties. Install the Software 4.7. You will need to follow the steps in Appendix 1 in order to get the required information to fill out the table above. Test the backup software by running the daily-backup.5 command line interface. Decide which method(s) you will be using to transfer your backup files and to which remote machines or attached devices.cron and its associated programs the user will have to follow some basic commands in the PBX in a Flash 1.conf file.5. Configure the /etc/pbx/daily-backup. Fill out the information tables above prior to installing the software. SMB. The general order of installation is as follows: 1.

7.5.INSTALLING THE SOFTWARE Please log onto your PBX in a Flash 1.5 system as root and perform the following steps STEP 1 Type help-pbx and then tap the ENTER key As you scroll through it you will see on page 3 the new install-dailybackup program Daily Backup March 2011 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 15 .

Daily Backup March 2011 STEP 2 Type install-dailybackup and then tap the ENTER key. You will see out standard license screen tap the Y key to agree with the terms and continue You might see the following screen if the mail configuration file is not present on the system © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 16 .

It is your problem to diagnose this and not the developers of PBX in a Flash! © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 17 . If your internet is down you will see the following Then If you see these screens you have problems with your internet connectivity.STEP 3 Daily Backup March 2011 Next you will see the download screen If the download is successful you will see the install proceed.

STEP 4 Daily Backup March 2011 As the install progresses you will see the following screens: © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 18 .

5 install. There are NO plans to back port this version so it runs in versions prior to 1. If you are running an older version of PIAF please use the deprecated version as it still works.5.7.Other screens that may be displayed Daily Backup March 2011 If you see this screen it means you are trying to run this program on a non PBX in a Flash 1.7.5 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 19 .5 installation or you are trying to run it on a pre PBX in a Flash 1.7.5.5. Unfortunately older installs of PIAF are incompatible with the new version of the program.

conf and then tap the ENTER key.conf file and add the appropriate information. This controls if the conf file is processed. Log into your PBX in a Flash 1. We recommend the use of joe for this purpose. It is shipped OFF © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 20 . All of the following screen captures are show inside of the joe editor environment.5 system as root and in the CLI type cd /etc/pbx and tap the ENTER key.5.conf • • • The can be no blank lines! Comments always start with a # symbol All options MUST be enclosed by double quotes for example: “1” There are NO capital O’s as options only Zeros 0 1. The first thing to edit is the master switch.conf file Daily Backup March 2011 We need to edit the /etc/pbx/daily-backup.7. It is a powerful text editor and allows you to use the WordStar commands . Now type joe daily-backup. A few notes about the disk-backup.Configuring the daily-backup. You should see the screen below.

Next we edit the configuration options Daily Backup March 2011 We recommend you use the defaults 3. The first is to use this backup method. © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 21 .2. The other 2 options are related to username and password for MySQL. Incredible Backup configuration – There is only one option to use it or not. The default is set to yes. If you have not changed this then the defaults will do nicely. 4. MySQL Dump configuration – There are 3 options. There is no reason to change the MySQL password as MySQL is not accessible except through the local console.

(They do get corrupted at times!). Digium License Backups – If you have licenses from Digium.5. Daily Backup March 2011 6. Please supply the USERNAME. it is a very good idea to back them up separately in order to facilitate easy restore. The default is to backup all files related to FPBX. There are two options and we recommend you keep the default settings. Altering the FTP information (If you are using ftp to store your backup files) Now referring to the table at the beginning of this document you need to edit the following fields with your information IF YOU ARE USING THE FTP TRANSFER FEATURE! The ftp transfer is by default TURNED ON. REMOTEDIRECTORY. and SERVER. PASSWORD. The primary one is FPBXBACK which tells the program to use the FPBX backup method. The DIRECTORY information SHOULD NOT BE CHANGED! Once you have entered the information Hold Page 22 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved . FreePBX configuration – There are multiple options and we recommend you leave the defaults alone. The options flag allows you to choose what you want FPBX to backup. such as g729. 7.

conf file. Now tap the ENTER key and you will be back into the disk-backup.Daily Backup down the CONTROL key and tap K then X (if you are using joe) to save the file. Press the UP arrow on your keyboard once and Linux will supply your last command. March 2011 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 23 . Now you need to reopen the file to continue editing.

The steps required to ascertain this are outline in appendix one of this guide. We recommend you leave USBMOUNTPOINT set to the default. It is recommended you format your USB hard/flash drive to the ext3 format and change the default from “vfat” to “ext3”.8. 9. You may need to change the USBDEVICENAME to what your local USB Hard/Flash drive is referred by the operating system. USB Information From within the editor scroll down the page until you see the following: Daily Backup March 2011 You will need to enable using USB hard/flash drives by changing CPFLASH=”1”. SMB Information © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 24 .

SMBUSER. Pogo Plug information Page 25 . SMBPASS. SMBSHARE. You will need to change SMBMACHINE. DO NOT CHANGE THE LOCALMOUNT! NOTE SMBMACHINE MUST BE A IPADDRESS ONLY! Using a machine name will not work! © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved 10.Daily Backup From within the editor scroll down the page until you see the following: March 2011 You will need to enable using network attached SMB drives by changing CPSMB=”1”.

Currently the PIAF Lab backs all of it test machines to a Pogo Plug device which has a total of 8 TB of storage. The initial development of using this device with PIAF is all thanks to Ward © NerdUno. This is usually the hardware name which can contain spaces. March 2011 You will need to enable using network attached Pogo drives by changing CPPOGO=”1”. We recommend you rename the Hard drive to something that does not have spaces in the name. The Pogo Plug is stored offsite to help assure business continuity in case of a disaster. Log compression facility © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 26 .Daily Backup One new feature of this program is the ability to backup to an internet attached storage device referred to as a Pogo Plug. Do not change the PMOUNT variable. POGOROOT is the name your Pogo Plug assigns to the hard drives connected to the PP. Lastly the POGOPATH is the name of the backup folder you wish to use under the POGOROOT. This can be accomplished by using the web interface to your Pogo Plug. If this directory does not exist it will be created on the Pogo Plug the first time the daily-backup. 11. Your PNAME should be your email address you use to log in to your Pogo Plug. PPAS is your password for the Pogo Plug. It can be anything but we recommend you do not use spaces in the name.cron is ran.

Appendix One Restoring your PBX in a Flash 1. Normally the log file is piped to the body of the email but due to the size some email servers will reject the message. In the CLI type cd /etc/cron./dailybackup. Now go away for a while.Daily Backup This feature allows the log file to be compressed with gzip and sent as a file attachment in an email. Check on your ftp/usb/smb/Pogo sites to see if the files were copied over. March 2011 Set GZIPPEE to equal “1” to enable this feature.cron file A critical step is to test the daily-backup. Testing the daily-backup.log. Now type .cron. This test will take a very long time. I recommend you look at the log file /var/log/daily-backup.7.cron file.tgz where XXXXXXXXXXXXX is a time-date stamp.5 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 27 .cron and then tap the ENTER key. If everything was configured properly the command should complete with no error messages on the screen. I recommend you start it and go to lunch.5. However your mileage may vary. There should be a file called MasterDailyBackup-XXXXXXXXXXXXX.daily and then tap the ENTER key.

We really need some volunteers to help write the individual restore steps. On our test machines it seems to “work” however this method is still classed EXPERIMENTAL until some brave souls test it some more MySQL database dump – If you need to restore you databases this website is a good start http://crunchbang.tgz Copy it to /var/lib Tar –xvzf DigiumLicense*. • Incredible PBX backups – This is well documented on Nerdvittles and the restore script needs some testing. Questions?: http://www.org/support/documentation/moduledocumentation/backup-and-restore • • • Digium License Restore.5 system we will briefly touch on this.freepbx. Just follow the wizard. o o o Extract the DigiumLicense archive from the MasterDailyBackupXXXXXXX.tgz © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 28 .7.tgz Copy it to /var/lib/asterisk/backups/piafbackup Open the FPBX gui in a browser and select the file to restore.org/archives/2007/11/18/bash-script-mysql-backup/ although this has a more in depth approach http://www.com/c/a/MySQL/Backing-up-and-restoring-yourMySQL-Database/1/ FreePBX – Restoring from a FreePBX based backup o o o o Extract the FPBX archive out of the MasterDailyBackupXXXXXXX.Overview Daily Backup March 2011 Because there are multiple ways of restoring your PBX in a Flash 1.5.devshed.

What you are looking for is the SCSI address that the OS assigned to it.7. The 9th line from the top tells us that it is device sdd.5. Please write this address down in the USB Table at the beginning of this document.5 Insert your flash drive into a USB port and wait a few minutes. Notice that Centos calls USB flash drives SCSI. This means that the usable partition is actually sdd1. Notice on the third to last line the snippet sdd: sdd1. STEP 1 Where is my drive? Type dmesg in the CLI and tap the Enter key. Other names can be sdb. sdc.7. This translates to the path /dev/sdd. You may have to look thru the output until you find something similar to below. Setting up your USB Flash Drive Adding a flash drive can be easily within PBX in a Flash 1.5.5. We now recommend that you reformat your USB flash drive to ext3 format which seems to be more reliable under Linux.Appendix One Configuring and installing your USB drive Daily Backup March 2011 You should repartition and reformat your USB drive using Linux’s fdisk and mkfs prior to using it with PBX in a Flash 1. Then log in to the Command Line Interface on your PBX in a Flash using putty or a similar program and do the following. etc © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 29 .

STEP 2 Partitioning and Formatting the USB Drive Daily Backup March 2011 In order to use the drive you need to repartition and format it. © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 30 . You should see a display similar to below. This will delete ALL existing information on the drive! At the CLI type: fdisk /dev/sdd (substitute your dive letter for sdd) Then tap the enter key and then tap the “m” key and then the Enter key.

Tap the “d” key. Daily Backup March 2011 Now create a new partition on the flash drive. Tap the Enter key twice more. Now write the changes to the disk. You should see a screen similar to the one below and it will indicate the drive is linux. This will delete the partition. Ensure the partition type code is 83! Tap the t key and then enter 83 . Tap the “1” key and then tap the Enter key. © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 31 . Tap the “n” key and then the Enter key. It is now asking for a Partition Number. Tap the “w” key and then tap the Enter key.Now we need to delete the existing partition. Eventually you will see the screen below. and then tap the Enter key. It will now ask you for the Command Action tap the “p” key and then tap the Enter key.

You should see something similar to the screen below You have successfully formatted you USB flash drive to use the ext3 file system.Daily Backup March 2011 Congratulations you have successfully repartitioned you USB disk. At the CLI type the following Mkfs –t ext3 /dev/sdd1 (substitute your drive letter) Now tap the ENTER key. Now we need to format the drive using the ext3 file system. © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 32 .

Type cd /mnt/usbmondo and then tap the ENTER key.cron program to work you need to ensure you unmount the USB flash drive. In order to mount the drive type the following mount -t ext3 /dev/sdd1 /mnt/usbmondo and then tap the ENTER key. Now type umount /mnt/usbmondo And then tap the ENTER key. © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 33 . The USB drive is disconnected from the mount point and no longer accessible. In order to unmount the drive type cd /root and then tap the ENTER key. You have successfully mounted your USB flash drive. For the daily-backup. This helps ensure that your backup files cannot be accidentally modified.STEP 3 How to use the drive? Daily Backup March 2011 The manual way to mount and unmount your usb drive is command line based. Type the command ls and then tap the ENTER key.

Appendix 2 Daily-backup. Note if this is set to "1" you must #disable backups in the FreePBX GUI as they are not needed FPBXBACK="1" # Daily Backup March 2011 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 34 . SENDLOG="1" # #Delete the backup files in /backup/daily after copying to remote device "1" = yes "0" = no DELBACKUPS="1" # #this is the local directory where files are located #This must exist! #DO NOT CHANGE DIRECTORY="/backup/daily" #*********************************************************************** # # #*********************************************************************** #INCREDIBLE BACKUP CONFIGURATION # # Use incredible backup methodology 0 = No 1 = Yes IBACK="0" #*********************************************************************** # # #*********************************************************************** #DATABASE CONFIGURATION # #Generate a MYSQL Dump of all databases 1=yes 0=no #Change as needed DBBACK="1" # #Default Database name for access to MySQL #Change as needed DBNAME="root" # #Default Database password for root to access MySQL #Change as needed DBPASSWORD="passw0rd" #*********************************************************************** # # #*********************************************************************** #FREEPBX CONFIGURATION # #Do freePBX backup from this file.cron that this file has been configured! #You must change it to CONFIGURED="1" for disk-backup.cron # Each line must have a # in front of it unless it is used to provide data #In other words NO BLANK LINES IN THIS FILE AT ALL!!!! #CURRENTLY EXPERIMENTAL # #*********************************************************************** #MASTER SWITCH #This indicates to disk-backup.CONF #071010 #This is the external configuration file used by /etc/cron. CONFIGURED="0" #*********************************************************************** # # # #*********************************************************************** #CONFIGURATION OPTIONS # #Send log file via email 1=yes 0=no #Change as needed Default is 1 and will send logs to the local root email account.conf file #DAILY-BACKUP.daily/daily-backup.crion to run.

It is now #recommended you format your USB to ext3 format following steps in the manual #If you want to use fat32 then change the "ext3" to "vfat" below. If you don't want to back up something replace #one of the yes's below with a no Please ensure the no is lowercase! OPTIONS="yes yes yes yes yes" #*********************************************************************** # # #*********************************************************************** #DIGIUM LICENSE CONFIGURATION #Check for and backup DIGIUM license files. REMFILES="1" # #These are the flags passed to the freepbx backup script #1st yes=backup Voicemail #2nd yes=backup Recordings #3rd yes=backup Configuration files #4th yes=backup CDR #5th yes=backup FOP #The default is set to yes. Daily Backup March 2011 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 35 .server.Change if needed #THIS MUST BE CHANGED PASSWORD="ftppassword" # #this should be the remote directory you wish files to go #into on the ftp server #Change if needed REMOTEDIRECTORY="/" # #this is the IP address or Fully Qualified Domain Name FQDN of the ftp server #Change to where you are sending your backups #THIS MUST BE CHANGED SERVER="ftp. 1=yes 0=no #It is recommended that you DO NOT CHANGE this setting LICBACKUP="1" # #This specifies which license files if any to back up separately #Initially this will be for digium licenses #The Digium files are located in /var/lib/digium DIGIUMLIC="/var/lib/digium" # #*********************************************************************** # # #*********************************************************************** #FTP CONFIGURATION # #Do ftp backups 1=yes 0=no Change as needed CPFTP="0" # #This should be the user name on the remote ftp machine #THIS MUST BE CHANGED USERNAME="ftpuser" # #This should be the remote ftp password.ip" # #*********************************************************************** # # #*********************************************************************** #USB INFORMATION # #Do usb flash drive backups 1=yes 0=no Change as needed CPFLASH="0" # # #This choice allows you to specify the USB file system to mount.#Remove fpbx from /var/lib/asterisk/backups/piafbackup 1=yes 0=no #change as needed Default is to REMOVE backup files after processing.

168.USBFS="vfat" # # #USB Mount Point #This can be modified if you understand how USBMOUNTPOINT="/mnt/usbmondo" # #StickDeviceName #This may have to be modified depending on what #the OS assigns to your USB Flash Drive USBDEVICENAME="/dev/sda1" #*********************************************************************** # # #*********************************************************************** #SMB INFORMATION # #Copy files to a remote SMB mount 1=yes 0=no Change as needed CPSMB="0" # #This must be an ip address ONLY Machine names are not acceptable #THIS MUST BE CHANGED SMBMACHINE="192.sh #DO NOT CHANGE! LOCALMOUNT="/mnt/smbmondo" # #This is the User name on the remote machine #for example your username on the windows machine where you are copying the files to #THIS MUST BE CHANGED SMBUSER="user" # #This is your password on the remote machine #For example your password that corresponds to the username on the remote #windows machine you are copying files to. #THIS MUST BE CHANGED SMBPASS="pass" #*********************************************************************** # # #*********************************************************************** #POGOPLUG INFORMATION *NEW* # #Copy files to pogoplug CPPOGO="0" # #This is the location the pogoplug share is mounted to already created by install-diskbackup #DO NOT CHANGE PMOUNT="/mnt/pogoplug" # #This is the username which is the pogoassigned email address #THIS MUST BE CHANGED PNAME="test1234@nowhere.com" # #This is the pogoplug password #THIS MUST BE CHANGED PPASS="password" # #This is the drive name as shared on the pogoplug #THIS MUST BE CHANGED POGOROOT="16gbflash" # Daily Backup March 2011 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 36 .2" # #This is the name of the share on the remote machine #THIS MUST BE CHANGED SMBSHARE="sharename" # #This is the local mountpoint name and path #this is created by the install-diskbackup.1.

#it will be created if not exist only use one folder deep for the moment! #THIS MUST BE CHANGED POGOPATH="test 15" #*********************************************************************** # # #*********************************************************************** # RSYNC INFORMATION *NEW* # #Use rsync use="1" do not use="0" USYNC="0" # #At the moment the command we are using is rsync -a -v folder/* destination #If there is demand we will make the command line accessible # #*********************************************************************** # # #*********************************************************************** #GZIP LOG FILE PRIOR TO EMAIL # 0 = no gzip 1 = gzip GZIPPEE="0" Daily Backup March 2011 © Copyright 2007 – 2011 PBX in a Flash Development Corporation All Rights Reserved Page 37 .#this is the destination folder on the POGOROOT drive.