Bill Arlofski's blog

Monitoring DAHDI channels on an Asterisk system with Xymon

With the severe thunderstorms and tornado warnings we have been recently subjected to, we inevitably end up having problems with the POTS lines connected to our Asterisk system. The problems have been due to either a physical issue between our office and the CO which the phone company has to repair, or a simple issue of forgetting to plug the POTS lines back into the analog card once the storms had passed.

The up side to this is that we have a very quiet morning with no ringing phones the day after a major storm, however the reality is that we may be missing important phone calls from our clients!

Generating Basic Bacula Backup Email Summary Reports

Update: 20170408 - A lot of work has been done to this script over the past four years. What started out as a "simple bash shell script" now has a lot of new options. Please use the latest version.

A request was made on the Bacula mailing list for a way to get daily and weekly backup reports. This got me to thinking that such a daily email would be useful.

So, off I went to write a simple bash shell script to generate these reports.

Keep in mind that this is a pretty simple report and it works for our needs. You may wish to modify it to include HTML formatting, additional fields such as StartTime and EndTime, total GB for all jobs, etc.

Automatically enabling/disabling removable vchanger volumes in Bacula database based on current availability

20130418 - Script re-written to utilize bconsole's "sqlquery" command to increase efficiency

Thanks to Josh Fisher for vchanger, and for recently sharing a few scripts on the Bacula mailing list which allow you to easily enable or disable all volumes in a pool, or all volumes on a vchanger magazine.

Making sure that only currently available volumes are enabled in Bacula's database solves a few issues - especially when using multiple removable magazines with vchanger.

The following script may be run manually when you swap removable media, or as a RunScript in an "Admin" type Bacula job. It will automatically determine which vchanger magazine(s) are inserted and available and will use bconsole's sqlquery command to to set the "Enabled" field in the Bacula database for all available volumes accordingly.

Encrypted offsite backups on auto-mounted media with Bacula & vchanger

Since backups are the most important process regardless of what industry you are in, it pays to put a lot of thought into creating a reliable, easy-to-use, scalable, and secure backup solution.

Why reliable?
This should be pretty obvious. Without a reliable backup solution that "just works" you can not be 100% sure that you will be able to restore any data at any time, and this clearly a bad thing. Files are lost or accidentally deleted by users and there is no excuse for not being able to restore this data.

Why easy-to-use?
If your backup process is not simple and painless for the end users (eg: the person or persons responsible for rotating the backup media) then sooner or later shortcuts will be taken, steps will be skipped, errors or warnings will be ignored, and you will not have the data you need when disaster strikes - and it will strike, it's just a matter of time.

Why Scalable?
How much data are you backing up today? Tomorrow? Next week, month, year? If you build a backup system to only handle your current needs, it will surely need to be replaced sooner than you'd think. You want to make sure that the backup solution you build will take care of your needs now and will continue to work into the future with minor adjustments rather than needing to be completely replaced in a year or two

Why Secure?
The only thing more important than having good offsite backups of your data is making sure that someone else does not have access to your data. This is where encryption comes in. If your backups are written to an encrypted device (hard drive, tape drive, CDROM, etc) then you can safely transport your backup media on a regular schedule to an off-site location without the fear of your data being compromised.