Tag Archives: Linux

Home Backup Server Using Bacula

Published by:

I have several personal computers that store documents, pictures, music, and videos that I need to backup regularly. Google Drive, Google Picasa, and Google Play Music provide offsite storage for my most critical files, and while these cloud-based file copies are convenient, I do not completely trust the files to Google. What if the services are compromised or the files are corrupted?

The general recommendation is to have at least three copies of your important files and data: a primary online copy, a local backup, and an offsite backup.

I debated between the need for a local backup and researched several secondary cloud-based options including Amazon S3, Backblaze, and Crashplan. The catch with any cloud backup solution is bandwidth. A full backup or restore of a terabyte can take weeks, and it’s often faster to load the files onto an external hard drive and ship them to/from the cloud storage vendor.

After ruling out a cloud-based backup solution due to prohibitively long backup and restore times, I looked into a few different local backup solutions. Most of my experience has revolved around commercial solutions including Netbackup, CommVault, and EMC Networker. Given that the commercial solutions are overpriced and overly complicated for home backup needs, I looked into Amanda and Bacula as open source solutions. Either one works fine, and Amanda has a few more enterprise class options, but I decided to go with Bacula because it is included in the Ubuntu repositories.

After selecting Bacula as the backup software solution, I researched a few different small servers. The backup server needed to be able to support at least 3 disks and RAID5, and I ended up purchasing an HP ProLiant N40L MicroServer. The base server comes with 2GB of memory, a single 250GB hard drive, and a 4-port SATA RAID controller. I had two 1TB hard drives laying around, so I purchased two more for a total of 4TB of raw storage. The MicroServer has space for a 5.25″ optical drive, so I opted not to install an optical drive and instead purchased a 5.25″ to 3.5″ bay adapter to hold the included 250GB hard drive. Beyond the storage, I upgraded the memory to 2x4GB memory sticks and bought a remote access card for headless administration.

If you are interested in buying the same components, you can check them out on Amazon. 2TB hard drives are probably a better choice if you need the capacity. I just wanted to make use of the two 1TB drives I already had.

After the hardware arrived, I installed Ubuntu 12.04 LTS Server (64-bit) on the 250GB drive mounted in the optical bay. The OS drive is not redundant, but I figure the OS can be rebuilt on a new drive in a pinch. Then I installed the ZFS on Linux kernel module and configured the 4x1TB drives as a ZFS file system. Finally, I installed the Bacula server and configured all of the clients.

Overall, the MicroServer fits nicely in my home media center, and the Bacula software has been doing a good job of consistently backing up my files for the past couple of months.

picasaView plugin: Could not load data from picasaweb.

New Web Hosting Provider

Published by:

I recently switched from a web hosting plan with IX Web Hosting to a Virtual Private Server (VPS) plan with Rose Hosting.

I had the “Business Plus” plan with IX Web Hosting for 2 years. The service stability was always a little spotty, but the price-benefit ratio was acceptable for most of my time with them. My plan was set to expire, and the site’s performance and stability were becoming noticeably worse, so I decided to check out other options.

Beyond the degradation of stability and performance on IX Web Hosting, I found that I had trouble accessing files whenever they were generated by the web server processes. My user owned the directory structure, but backups and file uploads were owned by the web server user. Due to this, I had issues with deleting files and/or changing file permissions. To work around the issue, I had to write a PHP script that would execute as the web server owner to delete files.

Considering the limitations of a web hosting provider, I decided I would rather have full control over the services by having a dedicated or virtual private server. Because this site is not exactly “critical” to anyone, I concentrated my search based on price rather than uptime. I ruled out a dedicated server based on the higher cost, leaving me with Linux virtual private servers.

The main open source virtual environments offered on Linux at this time are OpenVZ and Xen. OpenVZ and Xen are different but not different enough for me to pick one over the other. I continued my search primarily on provider reviews and price points. The Debian Wiki site offered a list of Linux VPS hosting providers, and I started looking at the plans that several of the providers offered. I was leaning toward using VPSLink when I came across the Rose Hosting virtual server specials. The prices seemed too good to be true, but after searching for reviews, the provider seemed legitimate. They may not be as big or as stable as some of the other providers, but the price is right for a blog like mine.

I ordered the Rose Hosting service late night on a weekend, and I did not receive an email reply providing my connection information. I contacted the provider’s support personnel via email and a chat window. It turned out that their email had been marked as spam by Gmail. After pulling it out of my spam folder, things have been going well.

I moved my MySQL database and website over to the Rose Hosting server and reconfigured my DNS entry. The best thing is that I can now monitor the server’s performance and uptime using all the basic Linux utilities. As of this time, the site has gone down once for 30 minutes as a result of a server outage. I did not inquire with support as to the cause, but the site has been stable otherwise.

If anyone is interested in having a cheap virtual private server for development or fun, I recommend Rose Hosting. I have only been with them for a month, so if my recommendation changes, I will post an update.

Amarok Variable Bit Rate (VBR) Track Time

Published by:

I just recently installed Amarok on my Ubuntu desktop at home. It has been years since I have used anything other than XMMS to play my mp3 collection. Let me tell you…Amarok is probably the best mp3 player I have used including anything I have used on Windows. (I do not have a Mac, so I can’t vouch for any music players beyond iTunes.)

One of the issues I had after installing is that my variable bit rate (VBR) mp3 track lengths were all wrong. After reading a few HOWTO’s and forum posts, I collected enough information to fix the issue by writing the track length in the mp3 track tag.

  1. Download and install vbrfix.
    sudo apt-get install vbrfix
  2. Run vbrfix against all your mp3 files.
    find /myth/music -type f -name "*.mp3" -exec vbrfix {} {} \;
  3. Start Amarok.
  4. Rescan your music collection (assuming the songs had been added to the library).
    Tools > Rescan Collection
  5. Restart Amarok.
  6. The track times should be accurate.

I am still working out how to control my Alsa PCM channel via Amarok and LIRC. If I have time to find a solution, I will try to post it.

Linux + Oracle Apps + Sun JRE Plugin

Published by:

I recently upgraded my production instance to 11i.ATG_PF.H RUP 5 and replaced JInitiator with the Sun JRE Plugin. To be able to use Linux with the application’s applets, just perform the following steps:

  1. Install Mozilla Firefox if you don’t already have it.
  2. Download the supported JRE. In my case, it is 1.5.0_12. Because Oracle cannot keep up with new technology, I had to dig around in the Sun Java Archive to find it.
  3. Copy the JRE bin file to where you want it installed. I copied mine to /opt.
  4. Make the bin file executable:
    sudo chmod 744 jre-1_5_0_12-linux-i586.bin
  5. Install the bin file:
    sudo jre-1_5_0_12-linux-i586.bin
  6. Create a symlink to the JRE plugin:
    sudo ln -s /opt/jre1.5.0_12/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox/plugins
    UPDATE: For Firefox 3:
    sudo ln -s /opt/jre1.5.0_12/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-addons/plugins
  7. Startup Firefox, and give it a whirl.