Skip navigation

Tag Archives: Linux

I’ve seen so many people attempt to restore Exchange and fail using Microsofts built in tools, or come unstuck because they want to restore a single mailbox, that I thought I’d document the free method of backing up Exchange that we use, so that it will hopefully help others.

One of the tools available from Microsoft free is Exmerge.  It allows individual mailboxes to be individually exported to PST files, which can then either be re-imported back into Exchange or simply opened in Outlook.  Exmerge is available from http://www.microsoft.com/downloads/details.aspx?familyid=429163ec-dcdf-47dc-96da-1c12d67327d5&displaylang=en

Extract and save to the Exchsrv/bin directory, and when the appropriate mailboxes have been selected, destinations set save the configuration.  This will create an exmerge.ini file.

This can then be scripted in a batch file and run as a scheduled task.  I create a folder on the local disk of the Exchange server (although this can be done to a mapped drive) for each day I want the backup to run.

My exmon.bat file reads:

D:\exchsrvrbinexmerge.exe -F C:\scriptsexmonexmerge.ini -B

Which runs the exmerge.exe, with the options specified in scriptsexmonexmerge.ini and runs the script as a batch job using the -B switch.

To clean the folder prior to running, I have a separate batch file that runs earlier on the same day that runs

del /F /Q /S z:\Exchangeexmon*.*

Subsequently to back up the PST files to a separate server I use the excellent BackupPC running on a Debian server.  Installation instructions for Debian are here: http://www.debianhelp.co.uk/backuppc.htm

The BackupPC box is confugured to access the SMB share that the PST’s are stored in, as well as additional file shares on the server.  BackupPC supports incremental backups and backups via a variety of methods (including SSH and rsync, as well as SMB).

It’s also possible to archive off historic backups for off-site using the archive functions within BackupPC.  As a free solution for backing up mailboxes and beiong able to recover easily (with version control) this is very effective…

Managing a Windows environment (2 separate domains, one running a couple of 2003 Servers and Exchange, the other running SBS2003), there are times when I need to run a Windows client.  Not least because the management tools required for our PBX phone systems (an Avaya IP Office and an Alcatel OmniPCX), our CCTV system (RMC), our photographic archive (iBase), our EPOS system and Sage Line 50 require windows to run and Wine is insensitive to. There are various other windows specific tools that effectively mean that I need a functional copy of windows to work, rather than beng able to switch over to linux as my sole desktop machine.

At the moment I use a KVM switch to swap between the 2 desktops I use (one is XP the other Ubuntu Hardy Beta).  I spend about 99% of my day in Ubuntu, but can’t escape windows completely….this means 2 machines under the desk – which at best is not very environmentally sound, and at worst is downright inconvenient.

The solution? well a virtualised copy of Windows running on the Linux box is the obvious solution, but what about all the apps and data accumulated on the Windows machine over the last x years…..this may seem like a small concern, but it would take a LONG time to reinstall these apps – because of the custom nature of them they are heavy on configuration time, and while they could be installed, it would be a pain in the backside….

Along come the nice people at VMWare though with the Vmware Converter (http://www.vmware.com/products/converter/) a tool that simply installs and then allows you to convert a physical install of an OS into a Virtual OS that can then be opened in VMware Workstation, Server or Player!

While it is designed to allow for the virtualisation of server environments this is the perfect solution for the likes of myself who still need to use Windows apps, that aren’t Wine compatible but REALLY want to ditch the spare Windows machine sat under the desk…

Working for a number of clients, it’s surprising how many people assume that an email sent is secure by default.  The number of people (including e-commerce providers) who feel comfortable sending (and requesting) credit card information via email is quite shocking…

It’s worth clarifying that sending an email is the digital equivalent of sending a postcard….anyone, on any number of the hops between the sender and the recipient, could read the contents of that email with relative ease, in the same way that if you sent a postcard, anyone en route between the sender and the recipient who handles that card could read the contents.  Worse yet, there are methods of spoofing (pretending to be) the recipient mail server – causing all emails that are destined for the recipient to be captured then forwarded on without the recipient even knowing that this has happened….

There are methods of securing email, however – one of these is worth noting as a free solution – GNUPG http://www.gnupg.org/ and it is worth considering if you need to send any information that you feel is sensitive.  GNUPG can be used for digital signing of emails (proving that the email is really from you) and also for the encryption of emails using a private key pair.

There are resources on the use of GNUPG on the site, and it can be used on a variety of platforms (Windows, Linux, Mac) etc.

Another cool article on SSH port forwarding:

http://www.cmready.com/polyoperable/?p=7

theres more info on using SSH to proxy outbound connections here:

http://www.debuntu.org/2006/04/08/22-ssh-and-port-forwarding-or-how-to-get-through-a-firewall

and on creating transparent socks proxys and reverse tunnels here:

http://www.linuxlogin.com/linux/admin/sshtunnels.php

😀

Just found this interesting article 🙂

http://souptonuts.sourceforge.net/sshtips.htm

🙂

I’m terrible for forgetting to exit a root session after I’ve been performing administrative functions on my machine, so I looked for some way of reminding me, and found this simple solution:

Edit the /etc/bashrc file to include the following function….

function setprompt
{
local RED="[$(tput setaf 1)]"
local RESET="[$(tput sgr0)]"
if [ `id -u` = 0 ] # check if user is root
then
PS1="$RED[u@h:W]$RESET "
else
PS1="[u@h:W]$RESET "
fi
}
setprompt

This then changes the prompt colour to red (or any colour you like) when logged on as root…..

Red Shell Prompt

I frequently flit between using a laptop and a desktop for work (both Ubuntu),

and I use a lot of files on the go. I’ve always just copied the files across from the

laptop when I returned to the office, but it’s not really efficient, as I had to either

a) copy all data – which could be several GB

b) select individual files, of which there were often loads.

I just stumbled across a small application called Unison though, and it’s pretty easy toinstall and configure. Potentially using this method, you could even sync securely over the web, as it uses SSH 🙂

First install OpenSSH server

$sudo apt-get install openssh-server

Then install unison :

$ sudo apt-get install unison unison-gtk

You then need to modify the profile (you can either set up a new one or modify the default) in ~/.unison

$sudo pico default.prf

Under the profile, you should have the local root path, remote (SSH) root path, and then any paths that you want to include, followed by any paths to exclude:

# Unison preferences file

root = /home/roachy/ root = ssh://roachy@10.204.4.35/ path = work/ path = Music/ ignore = Path work/archive/*

Save the file and either run the GUI version

$unison-gtk

or the command line version

$unison

🙂