Backup SVN with PowerShell

I work with a team of developers and utilise SVN for our source control. The backup script in place was a simple batch file and had a few shortfalls, so I re-wrote it with PowerShell.

Essentially it checks the location of the repositories, performs a svnadmin dump to another location on the same server, then copies them over to a network share that will get put onto tape.

$RepoLocation = "C:\Repositories"
$RepoBackupLocation = "C:\ReposBackup"
$FileServerDestination = "\\file\Backups\SVN"
 
foreach ($repo in (Get-ChildItem($Repolocation)))
{
    if (!$repo.Directory)
    {
        #$repo.Name
        $svnDumpSource = $RepoLocation + "\" + $repo.Name
        $svnDumpDest = $RepoBackupLocation + "\" + $repo.Name + ".dmp"
        svnadmin dump -q $svnDumpSource > $svnDumpDest
     }
 
}
 
robocopy ($RepoBackupLocation+"\") $FileServerDestination *.dmp /Z /NP

VMFS Recovery on a Broken Array

[Originally posted August 2009]

Yesterday, one of my colleagues swapped in a replacement disk we received from IBM for an x3650.  It was part of a RAID 5 array for one of our development ESX boxes.  Unfortunately, ESXi 3.5 didn’t seem to like that too much, and the whole volume was dropped.  After some effort, rebuilding of the array and other jiggery-pokery, we had no luck in getting ESX to see the disks.  Development team now out for half a day.

Today, we called one of our partners with a swag of VMWare certified engineers, and they couldn’t offer much help other than try a few warm and cold restarts, they suspected the array was at fault.  We had the option of re-adding the array to ESX to see if it would work but everything pointed to wiping of the LUN, which was not what we wanted.  We needed that data!  At this point I started to look for some options:

1. Use an Ubuntu Live CD (Jaunty) to try and see the volume – no joy, as I found out VMFS is a proprietary file system.

2. Try and download Ubuntu Karmic Koala Alpha 3 which looked to have some VMFS tools available – started the download then continued to look for options
3. Came across what appears to be some good work by one individual who has created a live CD toolkit just for this purpose.  Unfortunately I had to wait for administrative approval before I could download, so I kept this as a backup.
4. While downloading Karmic, I came across Open VMFS and a comment in the VMWare forum that provided some hope.

So I proceeded to try option four on an old bit of gear with ESXi 4 installed.  After some fiddling I had booted Ubunutu Jaunty, tried to load the Open VMFS driver but it did not recognize the VMFS partitions.  Gparted provided confirmation on the ‘unkown’ volumes pertaining to the size of the data store.  Not to be deterred, I tried on the same kit with ESXi 3.5 and I could read my vmfs store!

With a 1TB USB disk connected, the VMs got extracted with one exception – a virtual disk for one of the servers was giving I/O errors and I couldn’t get it off.  Had to use the filecopy parameter for large files (>4GB) and successfully retrieved a 70GB virtual disk.

Our Dev team was now out for 1.5 days, with a public holiday tomorrow it will mean everything should be fully operational for the next business day.

Is your IT professional certified?

There are a lot of IT professionals out in the market and in can be difficult to differentiate who is knowledgeable enough in the technologies you use.  If an IT professional is serious about their career, they should regularly invest time in obtaining and maintaining relevant certifications.

Why use a certified professional?

  • Demonstrates specific, in-depth knowledge.
  • Shows commitment to learning and professionalism.
  • Gives the customer confidence and value-for-money services.
  • Gives the professional access to additional support and other resources.

When hiring, don’t be afraid to ask for a list of their specific competencies  and certifications.  They should be able to explain their skill sets and how it is relevant to your business.  Anyone who has recently acquired certifications is dedicated to keeping their skills up-to-date.

So when you are looking for a professional, look for their certifications. Coupled with demonstratable experience, this should assist in choosing someone to help you and your business.

We’re not building a nuclear submarine

I’ve worked in an enterprise alongside a development team building a new platform for processing home loans. When I started I saw the project schedule – to be released within about two months. About three years later, a first version with 50% functionality got released.

The premise for the project was simple enough, and that was to speed up and automate the processing of home loans for quicker and more accurate approvals.  The underlying process was established in the existing system, and on the face of it seemed like an easy win for the development team.

So what went wrong?  From the sideline, I could see a few obvious problems:

  • The project was setup for a complete replacement, and not chunked up into modular parts.
  • The specification by the business analysts was detailed, perhaps too detailed.
  • The scope was changed multiple times during the project.
  • Project management was lax or at times non-existant.

Frustrated with the project, the business owner several times exclaimed “we’re not building a nuclear submarine!”.

Although this was a development project, it can be very easy for similar problems to occur on any type of IT project that you may embark on.  So what can we learn from this?

  1. Define your requirements clearly and succinctly.
    It isn’t necessary to go into minute detail, and perhaps use some agile methods, particularly for software development companies.
  2. Break the project into well defined deliverables.
    The adage deliver early and deliver often holds true in some respects.  This should also help stabalise a technology platform and hopefully deliver results that are immediately visible.
  3. Ensure there is a project manager and they are up to the task.
    The project manager should have regular updates on progress, assist with any roadblocks.  They are also required to put the brakes on scope changes, and keep the business abreast of the development efforts.

While this is only one example, its always a good idea to do a reality check with the stakeholders through the project.  This is to ensure expectations are clearly set.  Also makes for a happy client.