Blog

Windows server backup OpenVZ and TimeDicer

Setting up Ubuntu 10.04 Virtual Machine with OpenVZ

Installing and Setting Up OpenVZ

Backups are an important part of any IT Technician’s life, the good ones anyway, and so I began setting up a backup system for our clients and our own machines. The system chosen to do the backups was one called TimeDicer. This system works with all versions of Windows OS from XP to 7, and is very well thought out.

The TimeDicer website stated that the supported configuration of the system was an Ubuntu 10.04 setup, and so I decided it would be best to create a virtual machine using Ubuntu 10.04; (this in itself brought its own array of problems…but more on that later).

Our main hardware servers are CentOS based machines, and so I needed to create a virtual machine on of our servers. To do this I installed OpenVZ with the following steps, from the OpenVZ quick installation wiki page found here.

The repository for OpenVZ needed to be installed first. This was done by following these steps.

cd /etc/yum.repos.d

wget http://download.openvz.org/openvz.repo

rpm --import  http://download.openvz.org/RPM-GPG-Key-OpenVZ

The next step was to install the kernel that OpenVZ would use. As I was going to run OpenVZ on a 64bit CentOS host machine I needed to use this command.

yum install ovzkernel-ovzkernal.x86_64

Now OpenVZ was almost ready to roll. However there was still the issue of networking when I rebooted into the OpenVZ setup. This was solved by editing the /etc/sysctl.conf file with the following

#On Hardware Node we generally need
#packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
Enables source route verification
net.ipv4.conf.all.rp_filter = 1
Enables the magic-sysrq key
kernel.sysrq = 1
# We do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

An important note to remember, for all you avid coders out there, is to comment out any conflicting terms or replace them entirely.

  1. Also make sure that SELinux is disabled in /etc/sysconfig/selinux
  2. At this stage OpenVZ will have placed itself correctly into the bootloader of the machine so when I rebooted, it instantly loaded the kernel and OpenVZ was up and running.
  3. The last step to get an Ubuntu 10.04 virtual machine running is to download the template that OpenVZ will use. I downloaded the Ubuntu-10.04-x86_64.tar.gz file from here into /vz/template/cache. There is no need to unpack this file as OpenVZ kindly deals with that itself.

So all that should be left to do is run the command:

 vzctl create 101 --ostemplate Ubuntu-10.04-x86_64

This should then set the ball rolling and OpenVZ will attempt to load the virtual machine. It is important to only use identity numbers of 101 upwards as OpenVZ uses 1 – 100 itself and this could cause conflicts later on. Finally I needed to give the virtual machine a name and set its IP address. The details to do which can be found here. After this has all been set, (note: remember to put –save at the end of each line), I then started up the virtual machine

vzctl start 101

I entered the system to check everything had been set up correctly, it’s important to check ssh connections here just in case they didn’t get transferred over; which luckily mine did. With the following command…

vzctl enter 101

…everything was now set up for the timedicer server to be installed.

 

Install TimeDicer

I followed step three on the TimeDicer instructions, found here, which was…

cd /opt/

wget http://timedicer.co.uk/server/timedicer-server-setup

chmod 744 timedicer-server-setup

When I first installed the TimeDicer software there was an issue with it finding the machine’s IP address of an OpenVZ system, and so I had to hard code the IP address of my machine into the timedicer-server-setup script. However I only mention this for anyone who has the same issue; TimeDicer has recently been updated to accommodate a more general IP address setup, and so it can now find the IP address. I have even tested this and it works perfectly!

The last command to run is:

/opt/timedicer-server-setup –f [email protected]

This should set everything going, and by following steps 4 and 5 I was able to test that the webserver had worked correctly; I then secured my web interface.

 

Setting Up Client Machines

The steps on TimeDicer’s website about ‘Making a Backup: Using TimeDicer Client’ worked perfectly for myself however I then ran into an issue with the VSS side of things, and the fact the client machines would have more than one hard drive installed.

EDIT: TimeDicer no longer deletes old shadow copies so this section should be unnecessary. I have left it here for reference if anyone has similar problems. However I would suggest contacting the creator of TimeDicer directly.

TimeDicer by default deletes all old shadow copies on the machine when it begins a backup. This for me was not appropriate as shadow copies are used to replace files that get corrupted with an earlier version, or if someone accidentally deletes a file they needed; this happens far more than you might realise.

After speaking with the creator of TimeDicer I was able to disable the VSS deleting. This can be done by opening the file C:\Progam Files\TimeDicer\TimeDicer.cmd with something like notepad++.

Then changing line 455 from:

ECHO y|"%runfrom%\vshadow-%VSHADOWVER%-%WINBIT%.exe" -da>nul

To:

REM ECHO y|"%runfrom%\vshadow-%VSHADOWVER%-%WINBIT%.exe" -da>nul

This comments out the line and stops TimeDicer from deleting previous shadow copies.

The next hurdle came when I needed to back up more than one drive at a time. For instance TimeDicer straight out of the box can back up the documents and settings of the user running the program from the C: drive. However in my case I wanted to back up some data from the C:, D: and F: drive of my client machine. After yet more discussion with TimeDicer’s creator I was then able to get it working. The solution was that it needed a TimeDicer.txt file for each drive, which is the config file that TimeDicer uses to run.

So I first went about creating TimeDicer-D.txt and TimeDicer-F.txt with a similar configuration as the original TimeDicer.txt file; just with the list of backup for each drive at the bottom (such as D:\, d-drive).  TimeDicer is quite flexible and can be edited in many ways, shown here, the way I chose was to have each TimeDicer.txt file outputting to its own log with:

SET log=C:\Documents and Settings\User\Application Data\TimeDicer\filename

This can also be done with the excludes file if you wish to.

Finally to run the setup as one scheduled task instead of three I created a batch file TimeDicerStart.bat with the following commands.

CALL “C:\Program Files\TimeDicer\TimeDicer.cmd” /x

CALL “C:\Program Files\TimeDicer\TimeDicer.cmd” /f C:\Documents and Settings\User\Application Data\TimeDicer\TimeDicer-D.txt /x

CALL “C:\Program Files\TimeDicer\TimeDicer.cmd” /f C:\Documents and Settings\User\Application Data\TimeDicer\TimeDicer-F.txt /x

The /x tells TimeDicer not to pause and ask for “Press any key to continue” which allows scheduled tasks to run it and close it. And the /f tells TimeDicer what config file to use.

I also found an issue with the private key on Windows Server 2003, which isn’t really supported by TimeDicer, but it does work. The scheduled task would come back with an 0x8 error. Now no matter what google might tell you this isn’t a Windows issue about logging into a user via a terminal connection. This is simply just the error code of TimeDicer, a list of which can be found on the man page, saying it cannot find the private key. To solve this issue you just need to add this line:

SET key=C:\Documents and Settings\User\Application Data\TimeDicer\privatekey.ppk

Or similar depending on your set up.

After this I just ran the TimeDicerStart.bat file that I created earlier from command prompt and everything work perfectly. The scheduled task began to back up every day at the correct time with no errors.


Posted in Uncategorized | Comments Off on Windows server backup OpenVZ and TimeDicer

How to: Recognise Laptop Memory

It’s well known that the cheapest and easiest way to give your old laptop a new lease of life is to bung some extra RAM in it. In most laptops it’s as easy as turning it upside down, unscrewing a cover and pushing it into the right slot.

fitting laptop memory

Recognising what memory you need to buy can be a little more tricky.

Continue reading

Posted in How To, Technobabble | Tagged , , , , | Comments Off on How to: Recognise Laptop Memory

Domain Names(I): Dumping btconnect

vanThey should have gone out with the millenium fireworks, but, like the Dome, ten years later, they’re still with us. You’ve all seen them, on the sides of expensively paintworked vans and adorning smart business cards everywhere, the jarring ‘[email protected]’ email addresses.

OK so it’s not always btconnect, there are others, but the point is it looks like you haven’t a clue what an email address actually is, and either have not been established long enough to sort out a proper address or can’t afford it; neither of these inspire confidence. The most puzzling companies are the ones that have a perfectly good website address, but don’t use it for their email; once again they’re either clueless or their website company is ripping them off.

So for all you dot com virgins out there, let me explain.

For a small fee, you can have a ‘domain’ of your very own. This is the bit after the @ sign where btconnect.com, hotmail.co.uk or tiscali.com goes at the moment. You can then have [email protected], [email protected], [email protected] or anything else you would like.

It doesn’t cost that much, usually just an annual or bi-annual fee for registration and another to handle email sending, receiving and storage. You can even use this domain as the address for your website when you get really confident.

You don’t even have to abandon your current way of reading your email, in fact paying for a professional service should offer you more ways to access it, not less. If you currently have it coming to a program like Outlook, Outlook Express or Thunderbird on your computer, you can carry on doing that. If you prefer to log into a webpage to read it when you’re out and about, then you should be able to continue doing that.

So to sum up, getting a professional looking email address is important and not that expensive (although those 99p, or free and thrown in with your internet access ones are too good to be true, read the small print). If you agree, then you now have to choose the right domain for you and your company, I’ll cover this in Domain Names(II): Pick n Mix, coming soon.

Posted in Rants, Technobabble | Tagged , , , , , , , , , , | Comments Off on Domain Names(I): Dumping btconnect

I love Google Street view

I admit it, my awareness of spacial relations is pretty bad. I can read maps, but sometimes have problems relating what I see on the page or screen to what is there in front of me. When going to see someone for the first time I used to have to write down the streets in front of (and after) the one I needed to turn up in case I didn’t spot it in time.

Street view has changed all that. Instead of having to remember ‘2nd on the left after the roundabout then 3rd right’ I can fire up street view and tell myself, ‘Left at Cafe Vienna then right just after the newsagents’. Much more me.

OK so it sometimes throws me if those children are not playing football in the sidestreet and that bald man is not waiting at the crossing, but… even Google isn’t perfect.

Posted in Enthusiasm | Tagged , | Comments Off on I love Google Street view

Top 5 essential pieces of equipment for mending PCs and laptops

I’m not including the usual stuff everyone has, like power meters, test screens, screw drivers etc., because that would be both obvious and boring. What I’m listing here are the things that all those years ago, as I opened my first PC case, I never realised would become my new best friends.

5. Post-it Notes

post-it-notesThe computer has a password, slap it on a post-it. The computer is awaiting parts, slap it on a post-it. The computer has its COA in an inaccessible place, slap it on a post-it. You have to leave the repair at a complicated place while you go and rescue your cat/dog/mother from up a tree, slap it on a post-it. You need to remember how much the parts cost before handing it over to accounts, slap it on a post-it.

They really are essential and need to be neon, the brighter the better.

4. My Trusty Bead Tray

bead-trayA see-through, plastic, bead tray split into 32 tiny square compartments, with a lid that locks closed tight enough that not even the tiniest ipod screw can exit its designated square. I haven’t lost a screw since I got it, apart from the odd one I dropped on the floor and I’m working on a spider powered metal detector to solve that one.

3. Plastic iPod Openers/Pry Tools

prytoolsI buy these in bulk, they are fabulous for jabbing into anything you don’t want to leave scratches on. Especially those laptop keyboard bevels you usually need to lever off before you can get at any of the juicy bits. I admit, sometimes you need a bit of screwdriver powered brute force and ignorance, but, if you want to leave a laptop/iPhone/remote control exactly as you found it, they are the business.

2. Heavy-Based Solar Powered Light

solar lampThe ones they sell at Ikea are ideal. In the past I have used torches, head-band lights and glow-sticks, in fact everything but naked flame, but nothing beats one of these. The base stays exactly where you put it, without tipping, while you bend and wiggle the long neck to direct the light just where you need it. No wires, no batteries either, and when you’ve finished you just pop it on the windowsill and it’s soon ready for yet another wrestle with a motherboard’s f-panel connectors.

1. Nail Varnish Remover

nail varnish removerThe cheaper and nastier the better. You really don’t want anything that is kind to hands. It cleans off the nastiest gunk, it removes years old permanent marks from unsuitably graffitied plastic monitors and cases, it cleans up dried-on thermal paste in seconds, removes labels and evaporates instantly. Not for use in enclosed spaces I admit, but there is no way I could ever manage without it.

Posted in Lists, Technobabble | Tagged , , , , , , , , , | Comments Off on Top 5 essential pieces of equipment for mending PCs and laptops

Wanted: 16GB iPhone 4

Did you know that there are absolutely no iPhone 4s in the North West?

Yup, I wasn’t surprised either; especially after walking past the queue of at least fifty people coming out of the Preston O2 store at 8.13am on launch day. Yet the saddest part about that queue is that I was almost in it. But I took one look at the size of it, which went past 2 shops and round a corner, and decided I would be very late to work and probably wouldn’t be able to get one anyway.

Today I ended up ringing all of the local O2 stores in the vain hope that I might be able to get my hands on one. Yet after many phone calls, and even one store putting the phone down on me, I sat back and sighed, knowing that I wasn’t going to get my hands on one for at least another week. Continue reading

Posted in Rants | Tagged , , , , , | Comments Off on Wanted: 16GB iPhone 4

Domain Renewal Group – scam letters

Have you received a letter from the Domain Renewal Group?

It will look like a regular invoice a busy business might pay without thinking about it and, if you read further, there is a lot of scary text saying that if you don’t pay, you might lose the precious domain name that your business depends on (e.g. darkblue.uk for us – it’s your website address and email address, mainly.)

But don’t pay it, it’s a scam.

We had loads of these over the years from the group’s previous incarnations as ‘Domain Registry of America’ and ‘Domain Registry of Europe’, then we set the whois information on our domains to private and they went away.  Every domain has a public record of who owns it, in a similar way to all limited companies have a public record of who the directors are.  Of course, in this case you can lie blatantly or just block it and you don’t get in serious trouble with men in pin-striped suits with no sense of humour.

However, one of our clients recently got one of these and very sensibly called us to find out what it is all about. So we are repeating the warning: DON’T PAY IT, IT’S A SCAM.  We think that this company got the address details years ago, before we started marking all domains we host as private, and are starting to use them again.

Your real domain registrar (especially us) will not let your domain lapse, it’s their business and they don’t want to lose it. As domain sellers we get a reminder well in advance of the renewal date.

It’s very sad that a company can only get business by taking advantage of most people’s confusion over all things computer based, dressing up notices as invoices and scaring people into paying them.

An example of the letter can be found at http://www.redline.co.uk/blog/2010/04/30/domain-renewal-group-scam/

Posted in Rants | Tagged , , , , , | Comments Off on Domain Renewal Group – scam letters

How to access search folders for shared mailboxes in Outlook 2007

I spent some time fiddling with this today and have finally solved it. Took a while to find something useful on Google, so I will note it here for my own reference and any Google refugees…

I wanted my PA to be able to see my search folders, especially the follow-up flagged items. I eventually found that I could see them fine on her machine if I turned off cached mode, but as we access our Exchange server over a VPN this would get seriously annoying. Turning cached mode back on meant that I could still see everything in my mailbox, but search folders were missing.

There are two things to do. The first is to get the Exchange server to operate the search folders instead of just Outlook – this requires having the full-text indexer etc set up on the server, which is automatic from E2007 onwards anyway. All you need to do is log onto the mailbox to be shared in online mode – i.e. disable cached mode – and access the search folders once. This kicks the server and tells it to get on with it. You can test this by logging onto the mailbox in OWA, if the search folders are there this is done.

The second thing is very simple and just requires going into advanced settings in the profile that’s accessing the shared mailbox and untick ‘download shared folders’ under cached mode, but leave the cached mode box itself ticked. Restart Outlook and they appear (NB – the mailbox needs to be opened under additional mailboxes, not just by file/open shared folder.)

This was one of those things that probably required more effort than it will ever save, but at least it’s done now…

Posted in Technobabble | Tagged , , , , , , | Comments Off on How to access search folders for shared mailboxes in Outlook 2007