Tuesday, 5 October 2010

Bacula - The Open Source Network Backup Solution

Been a little while since I've blogged. I mainly blame this on World of Warcraft which I'm still playing quite a bit on Linux.

I've been looking at how I do backups at home again. I've written a script (in perl) that performs my backups, but it's been having a few problems. First of I worte it to backup my how server to my Netgear NAS. It did this using rsync to a NFS exported filesystem on the NAS. It turned out that the NAS crashes when about half way though a full backup! For some reason the NFS is pretty flakly on my Netgear ReadyNAS (which is a sparc CPU btw!).

The NAS also supported ssh and rsync protocols, so I stopped using NFS and started to transfer things over SSH. This however showed up another problem. It seems that the rsync parameter --list-dest does not work over SSH. This parameter is used to perform the incremental backups and only copy the stuff that has changed since the last time. To perform a full backup takes about 3 days currently (100Mbit network), so this is a no go. The backups need to be incremental.

I've started to think about writing my own backup application, but this time making a client/server type app that does not use rsync. Instead would have it's own storage daemon running on the NAS. At this point I started to look around at other free applications and discovered Bacula. This is what I've using to perform backups now.

This is a very nice application that consists of 3 main parts. Their is a storage daemon, that sits on my NAS. A Director which is a server that controls everything and a file daemon that also sits on my server. The file daemon is the client that is responsible for pulling files when the Director requests them. The director then stores them in the storage daemon. The good thing about this is I can run a file daemon on all the machines on my network and just have a single director on the server.

It was easy to install on my OpenSuSE machines, version 5 was available as packages and I used zypper to install them. Getting the storage deamon onto the NAS was harder. Their are packages, but they are a older version that is not fully compatible. I found I could perform backups, but not restore files. So I grabbed the latest sources and cross compiled it for the NAS which runs a SPARC architecture :-) If your familiar with cross compiling, then this is not to tricky. I need to some extra libs (sqlite3, zlib...) and then build the storage daemon static. After this it worked like a charm.

Bacula is a very command line based application, it's controlled from configuration files and a console. Once I got these all working I manged to setup nightly incremental backups. The acuall backups appear to be a lot faster than my previous solution. Their are some GUI consoles, but this are basicly not much more that a place to type commands. So in my view still a command line. I bealive their is also a web client, but I've not got round to installing that. Will be giving it ago soon.

If I don't find a good graphical client, then I might think about creating one. Main reason for this is we have a number of laptops in my family (windows and Linux) and I'd like these to have a good UI for doing backups.

Thursday, 1 July 2010

World of Warcraft stopped working in Crossover Games

I've been playing World of Warcraft most nights. What can I say, I'm addicted. As mentioned in previous posts, I bought crossover games to play WoW on my Linux Box and it was working very well. That was untill last night. WoW patched it self last night to version 3.3.5, cxgames/wine crashed a couple of time trying to update, howerver in the end I updated to the latest WoW.

No I have the problem that I can't log into the game server. Seems Crossover games no longer works with wine! Hoping their is a patch for this before long otherwise I'll probally have to find another solution.

As a software engineere I can understand how tricky it is to work with every version of the software. Don't expect blizzard shipped a earily release to code weavers before for pushing the patch to users. That would have given code weavers change to fix crossover games.

I could run WoW on my new Mac Mini, but I'd much rather be running it on my main Linux box with dual screens. Since I've bought the Windows version of WoW I'd probally have to buy the mac version. Maybe if you buy wow you can use either version, not sure about that.

Moving from windows to Mac OS X

Since I had problems updating my firmware using iTunes in windows running in VMWare workstation, I've been looking for another solution. I seem to have found one! I bought one of the new Mac Mini's (The server version as to has better spec). I'm now using this for syncing all my gadgets.

Mac OS X works a lot better for me than windows ever did. I've been able to connect it to the ldap server and nfs server on my network. This means and don't have to do much admin work on the sever, everything is controlled from a central location. Most importantly, when I backup my server and backup up all the user data on the mac.

The new Mac's are very nice. I have a older one belowe the TV which serves as a media center and I've been thinking of getting more other TV's at somepoint. Having one which can be used as a desktop computer will help qutie a bit with setting these others up. I don't want to have to admin each of them, I'd much rather come up with a solution where they are all configured on my server.

Reconfiguring Max OS X snow leapord to talk to my LDAP server and authenticated agaist it was pretty tricky. In fact I find OpenSuSE quite a bit easy to configure than the Mac. Most my admin work is done remotely from the command line for variours reasons, this a hell of a lot easier on OpenSuSE. Some think apple should sort out if they are seriours about Server opearting systems. In the end I got things working by changing the mac to use the LDAP profile "RFC 2307".

The automounts are still now working, so that will be a task for another day. It seems that RFC 2307 is not the same as what my linux boxes use. I might be able to tweak the mac to work, otherwise I'll have to add new entries into the ldap for mac's.

The next pain I had was group ID's. The ID's in the mac clashed with the ID's on my linux box. I fixed this by renumbering the ID's on the Mac, then adding them to the ldap server. I then updated the users so that on linux the mac groups were also visible. This was pretty complicated as the groups are stored on the mac in it's directory service as well as flat files. I wrote a perl script to perform the update. The directory service files are stored in these folders :

/private/var/db/dslocal/nodes/Default/groups
/System/Library/DirectoryServices/DefaultLocalDB/Default/groups

Anyway I've spent the last few nights putting all my iTunes conent into place and synced my phone last night. All is working very well. Will have to repeat the user setup for my wife's account. Hopefully firmware upgrade will go smoother this time.

Wednesday, 23 June 2010

Running windows under VMWare

I've spent the last week running windows vist 64Bit under VMWare to see if it can be used sync my gadgets (iphone, tomtom, harmony remote). All as been going pretty well, though still frustated my roaming profiles. The cause windows to take ages to log in and out. A nfs soultion would be much better given that this machine is a desktop one.

I've been syncing my iPhone without problems, which gave me a lot of hope that things would work. However last night I tried to upgrade the firmware to iOS 4. This proved to be impossible and left the phone useable. I googled around and found some suggested fixes for the problem, however none of them worked and all involved hacking around with the Linux Host USB options. If I can't update the firmware, then VMWare is not going to work for me.

I'm not considering other options, and it seems the best one is to by one of the new MacMini's. More money than I wanted to spend, but the benefits are quite large. First of I should be able to connected it to my linux next work with ldap auto mounts via nfs. No more roaming profiles! Backuping up to my Nas should be easy. My netgear nas pretends to my a apple time machine.
All my gadgets seem to work on MacOS X so I should be able to sit the box on the desktop and use VNC from my main Linux machine.

Friday, 18 June 2010

Getting gadgets to work with linux

So I'm not at stage 2 of replacing windows on my gaming machine. So far the games I play are working very well using crossover games from codeweavers. The next step is get my tomtom, iPhone, iPod and Harmony remotes all working and syncing.

In a perfect world their would be native Liunx drivers for these products, but that does not seem to be the cause. The really anoying thing is that at least one of these devices is running Linux! So currently I'm evaulating VMWare. I will hopefully be able to install iTunes and all the other drivers under vista in VMWare running windows vista. So far the installation of VMWare has been pretty easy and I'm currently setting up vista to talk to my network (Samba PDC). The trick part was working out what product I actually wanted. The VMWare website lists all sorts of products, I'd suggest they create a table showing how they all differ.

VMWare does strike me as slighly overkill for what I want, and I would quite happily pay codeweavers or anyone the price VMWare will cost me to get all these things working in crossover office. I wonder how many other people think this too? If I'd not already had to by windows vista, I'd give them that money also. I guess the main problem is getting USB devices working under wine and keeping up to date with the latest versions of iTunes.

I'm also going to have to install outlook, and the only reason for this is that iTunes only really supports Outlook for syncing.

Saturday, 12 June 2010

Crossover games 9.0.0

My windows vista machine has recently developed a hard disc fault, their is a clicking noise and the machine keeps freezing. This machine is mainly used for playing games and syncing my iphone. I've got a new hard disc on order, but it occured to my I might not need to run windows on the machine any longer. Since stopping Neverwinter Nights development, I've been playing World of Warcraft (WoW) and Guild wars. I've notice that both of these run in crossover games now so though I'd give things ago.

So I've got crossover games 9.0.0 installed on my laptop, the laptop is less powerful than my windows machine so I won't be comparing performance. All I'm looking for is the games run correctly and they are playable.

First thing I need to do is install WoW, this is quite a painfull process as it's a huge game. It was painful on windows too. Rather than install from the CD's I though I'd use the Internet installer, so I downloaded it and used crossover games to install it. The install process then took 2 days....... 6GiG download. Wish I'd used the DVD now :-) Anyway, a couple of days later and it's all installed, but now it needs patching!!! This is really anoying thing about wow, you think it would just have installed the latest version. So anther day and a half later and it's patched to the latest version.

I can now run wow and see the initial screen. Crossover games has added a icon to my KDE desktop and start menu which is great. I now try to log into my WoW account, it's at this point things go really wrong. Turns out I downloaded the wrong version. I have the enUS and not the enGB, so I can't log into my account. This means another 4 days of downloading...........

Ok time to try something different, I move the Wow install on my hard disc and mounted my windows machines hard disc via samba. I now copy the installed version on their to the place where crossover games installed things before. There is a config file at the path "World of Warcraft\WTF\Config.Config.WTF". With the help of a crossover games WoW page I edit the settings in their to add the following:

SET SoundOutputSystem "1"
SET SoundBufferSize "232"
SET gxApi "opengl"
SET ffxDeath "1"
SET gxMultisampleQuality "0.000000"
SET gxFixLag "0"
SET fullAlpha "1"
SET lodDist "100.000000"
SET SmallCull "0.070000"
SET DistCull "500.000000"
SET farclip "477"
SET particleDensity "1.000000"
SET unitDrawDist "300.000000"
SET gxCursor "0" SET baseMip "1"
SET spellEffectLevel "0"
SET weatherDensity "0"
SET pixelShaders "0"
SET ffxGlow "0"

After all of this, I fired up WoW again and successfully logged in. I've been playing the game most of the day and it's all working really well. It's a little sluggish in places, like for example when it displays a tool tip. That is probably down to my laptop been a bit underpowered. All in all, crossover games is really impressive.

I think I'm going to be checking out VMWare next for running iTunes and iPhone syncing. If that works I'll be able to ditch windows for Linux.

Wednesday, 9 June 2010

Scanners in Opensuse 11.2 (64 Bit)

For a while now I've been attempting on and off to get my flatbed scanner working in OpenSuSE versions. I've tried most versions from 11.0 to 11.2, but I always ran in to the same problem. The problem is that Yast tells me it will work on a 32Bit version of OpenSuSE, but not a 64 Bit version. I've got a "Epson Perfection 4490 Photo" flatbed scanner that I'm connecting via USB.

Last night I need to do some scanning and felt it was time to have another go and getting it working. Yast gave the same error message, so I though I'd check out the Epson website for drivers. First of their UK site was completly broken :-(, but their US site was working fine. I was surprised to find that their was drivers for Linux on their site!! How things have changed these days :-)

It turns out that the driver is a link to another site http://avasys.jp/eng/. This site seems todo quite a few drivers for Linux, amongst them are 64 Bit drivers for and instructions for my scanner. They also seem to have the source code on the site. It's quite possible that the OpenSuSE driver support for scanners could be improved by this.