Skip to main content


Showing posts from February, 2013

Traffic Monitoring using Ubuntu Linux, ntop, iftop and bridging

This is an update of an older post, as the utilities change, so has this concept of a cheap network spike - I use it to troubleshoot network issues, usually between a router and the network to understand what traffic is going where. The concept involves a transparent bridge between two network interface cards, and then looking at that traffic with a variety of tools to determine network traffic specifics. Most recently I used one to determine if a 4MB SDSL connection was saturated or not. It turned out the router was incorrectly configured and the connection had a maximum usage under 100Kb/s (!) At $1600 / month it's probably important to get this right - especially when the client was considering upgrading to a faster (and more expensive) link based on their DSL provider's advice. Hardware requirements: I'm using an old Dell Vostro desktop PC with a dual gigabit NIC in it - low profile and fits into the box nicely. Added a bit of extra RAM and a decent disk and that&

OTRS Restore Procedure and backup script

As I note in my previous post, I managed to kill my OTRS install and as usual had to trawl around the net to remember how to restore it. In a nutshell: # mysql -u root -p msyql> drop database otrs; mysql> create database otrs; mysql> ext # /opt/otrs/scripts/ -d path_to_backup  /opt/otrs You did back up right? Nightly I run a script with the following in it: #!/bin/bash # Variables below - change these to suit NOW=$(date +"%Y-%m-%d_%H-%M") # this gets the correct file name for OTRS backup LOCAL=/root/backup # a local directory for OTRS to backup to REMOTE="user@backupserver:~/backup/OTRS/" # remote backup dir - nfs share, ftp or cifs /opt/otrs/scripts/ -d $LOCAL # OTRS internal backup (files and DB) tar -cf $LOCAL/$NOW.tar $LOCAL/$NOW # creates a file from the OTRS backup folder - more efficient to copy over a network gzip $LOCAL/$NOW.tar rm -rf $LOCAL/$NOW # tidy up scp -r $LOCAL/$NOW.tar.gz $REMOT

Upgrading OTRS 3.1 to 3.2.1

After noting that our OTRS ( ) was complaining about a major release update pending I took the plunge this morning and set about upgrading it. Initially I ran through the normal upgrade procedure and couldn't log on. Oops. Maybe I need to pay more attention here? Turns out there are quite a few caveats about this upgrade, and I'm hoping that what I note here will assist you - especially the database upgrade stuff. That was a bit of a surprise! Initially I ran my normal script which stops services and backs everything up. That script looks like this: #!/bin/bash service cron stop service apache2 stop NOW=`date +%F` mkdir /root/backup/$NOW BDIR=/root/backup/$NOW cp -R /opt/otrs/Kernel/ $BDIR cp -R /opt/otrs/Kernel/Config/ $BDIR cp -R /opt/otrs/Kernel/Config/Files/ $BDIR cp -R /opt/otrs/var/ $BDIR /opt/otrs/scripts/ -d $BDIR Usually I then ln -s otrs-new otrs and run my upgrade script - but