File Backups on a funky looking QNAP 209 Pro

Even with the rather small number of websites that I have at the moment (having sold off Spy Review now), it’s still important to take regular backups. I’ve had automatic website backups going for months now, which I started doing on my Mini ITX. However, I became very frustrated with the Mini ITX as a media centre due to a number of sound volume issues, codec issues and a broken DVD drive. So I decided that I needed a better alternative.
I had a number of requirements for my backup storage that fulfilled all of my requirements, for scheduled backups overnight as well as generic storage for my music and documents. Therefore this is what I needed:
- Some kind of RAID storage for redundancy in the event of a hard drive failure.
- A linux or other unix-based operating to allow me to run scripts over ssh to backup all of my websites.
- A wired ethernet connection with support for FTP and NFS.
- Large disks, in the range of 500GB available storage.
- Costing less than £500
Having done some research, it became clear that there was only one gadget that met all of my requirements, namely the QNAP 209-Pro with two 500GB disks set up in mirror mode with RAID. Costing £440, definitely not a cheap storage device, but worth it if it did what I needed.
I’ve had my file server for about 3 months now, and having spent some time hacking it I now have my own cron tasks running every night taking complete backups of all websites. I’ve also installed subversion on it and use it for my development work. I even have all of my music stored on it and have configured iTunes to use the file server as a network drive rather than a local drive.
My only concern now is the issue of if its stolen or damaged. I have excellent security at home, but just in case of an accident, I need some way of backing up the entire device at a remote location. I’ve yet to decide on how to do this, but I will soon! The cheapest option is to connect it to an external USB drive.
The more expensive and automatic approach is to purchase an identical unit and have it stored at my parent’s house. You can configure the QNAP 209-Pro to use rsync to create a remote mirror over the internet. Aside from bandwidth costs, there’s the cost of another file server. Even still, plus.net offer unlimited bandwidth at off-peak hours with their broadband packages.
Running a PC 24/7 without wasting energy
Running a PC 24 hours a day is a very useful thing to have, particularly with running daily backups, using it for recording TV programs as a PVR, security and more. However, most PCs guzzle energy, and I’m trying to find a low energy (and therefore cost efficient) solution.
I currently have a Mini-ITX based on the Jetway motherboard, which is meant to be a low power solution. I want to measure its actual power usage with a mains energy monitor. If the power usage is less than 30 Watts when idle, that’s pretty good. However, adding a TV card when I convert it to a full PVR will increase the power usage a bit, particularly when actually recording.
I’ve explored other possibilities, such as a Tranquil PC, but they’re not much use as PVRs. Only really for desktop use. The VeryPC Green PCs are a step in the right direction, but are quite costly. It’s really a surprise at how few energy-saving PCs exist at the moment, but at least some companies are making a start.
My motivation is doing a bit for the environment and cost cutting on bills. But if the PCs themselves were cheaper, that would motivate a lot more people.
Wireless Media Centre Keyboard with Trackball
With the PVR project, I wanted a keyboard for the PC so that I could browse the web if I needed to, as well as using it as the remote control. With web browsing and using any GUI platform, using a mouse is easier than learning keyboard shortcuts. Therefore I wanted a wireless keyboard that had a trackball navigation device. After a fair bit of searching, I found one for £35 at Gizoo which had everything I wanted and actually looked nice too.
The trackball took a little while get used to, but now I use it all the time. I often use it for browsing the web, and the thumb wheel in the top left corner makes scrolling web pages really intuitive. I installed without the need for any drivers at all on Ubuntu, literally plug and play.
I suppose that it is a little overkill compared to a remote control, but it does do its job very well!
Tutorials, Hints and Tips for Web 2.0 Design
Whilst looking around for some hints and tips on the very characteristic user-centric web 2.0 design, I found a number of resources that you might find useful. For a number of resources on building a web 2.0 website from scratch, here are 30 resources on simplehelp.net.
For some very detailed Web 2.0 design tips, webdesignfromscratch.com has a number of specific design tips. For playing around with aqua style buttons, then here is a photoshop-based tutorial for a Web 2.0 header.
I hope that they come in useful. I intend to look at them in more detail for my more important websites.
Finally! TV Out working on my Jetway J7F2!

I finally got the TV out working on my mini itx system! I had spent ages changing BIOS settings and playing around with the xorg.conf configuration file in an attempt to get some output on the TV.
In the end, it was a jumper setting to enable S-VHS/composite output which was completely hidden under a LCD daughter board that has been installed by the previous owner (I purchased the box 2nd hand as a complete system). I found out about it by doing much searching and finding a Jetway motherboard manual for a very similar motherboard to my own.
I had already installed the OpenChrome Via Display Adaptor Drivers and I was certain they were working correctly due to the output messages I was reading in the xorg log file. With some help from Adam, we set up the xorg.conf using details provided for getting TV out working with OpenChrome.
Now that TV out works, I’m playing around with DVD, MP3 and DivX support. Hurrah!
Trouble getting TV Out on a Mini ITX PC
A while ago, I treated myself to a mini ITX PC. I’m looking to move to a Myth TV box (based on Ubuntu Linux), but before I buy a perfect system, I want to get the mini ITX working with the TV first. However, I cannot get the PC to recognise the TV at all. I’m expecting the PC to detect the TV on boot, but its not.
I’ve looked in the BIOS, and can’t see anything. Fiddling with the driver under Linux doesn’t appear to work. Any ideas?
Resetting MySQL root password under Ubuntu
Having set up my Ubuntu box a little while ago, I had actually forgotten what I had set my MySQL root password to. I was trying to set something up today and had a need to reset it. Thankfully, if you have root access on a linux box, its a simple procedure to fix. I have Ubuntu 7.04 (Feisty Fawn) and MySQL 5.0.38.
Stop the MySQL server:
sudo /etc/init.d/mysql stop
Start the MySQL configuration without checking the root password:
sudo mysqld –skip-grant-tables &
Log in as root to MySQL (without a password):
mysql -u root mysql
Replace the password with your new password:
UPDATE user SET Password=PASSWORD(’YOURNEWPASSWORD’) WHERE User=’root’; FLUSH PRIVILEGES; exit;
And that’s it!
Playing with Microcontrollers?

I’ve been toying with the idea of getting 123 Pic Microcontroller Experiments for the Evil Genius for a while now. Its not entirely what I am after, but it does include some interesting applications of PICs that do interest me. It includes interfacing PICs with LCDs, interfacings PICS with computers, and working with stepper motors.
The book features information touching on all of these subjects, and sometimes its just nice to have a book like this. However, I am having trouble finding other microcontroller books that form a solid basis for PIC projects.
Using JOGL and SWT in Eclipse Java Projects
I recently decided that I want to learn OpenGL, so I started looking for OpenGL implementations in java. Having done a fair bit of programming with Eclipse’s Standard Widget Toolkit (SWT) and java, I ideally wanted to integrate OpenGL with SWT. I didn’t particularly want to use AWT or Swing.
After looking around, I did find that SWT now supports OpenGL through Java bindings for OpenGL (JOGL). Finding source code to test this is not easy, but there’s a convenient torus example provided on the SWT site. This was perfect for testing that I had got my setup correct.

Setting up SWT and JOGL can be annoying with Eclipse unless you know what to do. I tried the instructions that I found on the web a few times, but quickly ran into gotchas. I finally discovered the correct solution, which I’ll explain more clearly than what I found on the web.
My explanation assumes a basic familiarity with creating and running a java project in Eclipse. If you don’t know how to do this, I suggest starting with the Eclipse FAQs. My recommendation is to separate the program code from the SWT and JOGL libraries. This is particularly a good idea if you are playing with a few different SWT and JOGL projects within Eclipse.
So here we go (based on doing this for MS Windows):
- Download the SWT libraries (rather than use the library supplied with Eclipse).
- Download the JOGL libraries.
- Extract all of the .jar and .dll files in both SWT and JOGL packages to a common library folder, e.g. c:\libraries.
- In Eclipse, in your java project, open the project properties. Click on the Libraries tab, click on the Add External Jars button, go to the c:\libraries folder, and choose all of the .jar files. For the current versions of both toolkits, there should be 3 jar files (swt.jar, jogl.jar, gluegen-rt.jar). This will allow the project to compile SWT and JOGL without any errors relating to library dependencies.
- Now we want to run the application. Create a run profile as usual, but to the Arguments tab for the application in the VM arguments you need to define the location of the library using the flag -Djava.library.path=C:\Library
- The application should find the libraries correctly now, and should run!
A simple tip for debugging Cron
I’ve started automating my backups using cron, and never having used it, I quickly stumbled into a problem.
I have a large number of websites, so it made sense to back them up daily using scripts. However, I was having problems with my hosting provider because it did not change to the user’s local directory before executing scripts, and thus could not use relative paths to find additional scripts that I was using.
So here’s my tip, make sure your email address has been specified in the file. My host had not set this up correctly, and so I could make sure the script was being run by overriding the mailto parameter. This way, if a problem occurs, you receive the output. When editing a cron schedule file, simply put this line at the top:
MAILTO=”your@email.address.co.uk”
Then you can get all of the problems delivered to your inbox!


