Backing Up JasperServer in Linux

This is a sysadmin how-to for backing up JasperReports Server (formerly JasperServer) and it's database (MySQL only for now).

I wrote a fairly robust script to achieve this task. It will read the database configuration from your default_master.properties file, work with several versions of JasperServer, delete old backups, write to the syslog and export the repository contents to file.

First drop my backup script into your \buildomatic folder if you're using 4.0 and abovie, 3.7 and below put in your /scripts folder.

Once the script is in place edit the variables at the top of the script:

This is to signify that you're using JasperServer 3.7.1 and below:

This is a name for the product:

This is where backups will be stored:

This will delete old backups if set to true

How many days to keep old backups

Now add it to your crontab. I will do it once a week in a lazy manner so will add the script to vim /etc/cron.weekly/js-backups


The script will log to /var/log/messages:

The output files will look like this, I chose to stick them in my Dropbox folder for off-site backups:

You can download the script from this jasperforge forum post or view it below:


Music Player Daemon w/ lame Support in Debian

Trying to get my old Blackberry to stream from my mpd server, it turns out the built in http stream output is not compiled with lame encoder (mp3) support. Here are some instructions on building the source package with the lame encoder options compiled in for Debian Squeeze (6.0)

(as root)
Install libmp3lame0 and lame from http://debian-multimedia.org/
cd /tmp/
Get the build dependencies for mpd:
apt-get build-dep mpd
Get the mpd source package:
apt-get source mpd 
cd mpd-0.15.12 (your version may differ)
Edit the file debian/rules and remove --disable-lame
Build the binary:
./debian/rules binary
Build the .deb package:

cd .. 
dpkg-source -b mpd-0.15.12
Install the package:

dpkg -i mpd_0.15.12-1.1_amd64.deb
Lock the package in place so that updates won't blow away your change:
echo mpd hold | dpkg --set-selections
That's it! Then you can configure an audio output in /etc/mpd.conf:
audio_output {
        type            "httpd"
        name            "My HTTP Stream"
        encoder         "lame"
        port            "8000"
        quality         "5.0"     
        always_on       "yes"  #This option doesn't seem to work for me :(