VMWare ESX Backup Script

January 2nd, 2009 Category: VMWare

There is a simple method doing automated backups using VMWare Infrastructure 3. For this reason a command “vcbMounter” is included. Also the name of this command is confusing it can be used for doing backups of virtual machines.

Doing a backup of a virtual machine can be done using a single command line call:

vcbMounter -a name:"Virtual-Machine-1" -r "/path/to/backup/Virtual-Machine-1"

Ok, your vm named “Virtual-Machine-1″ will now be backuped to the given path. The directory is generated from vcbMounter. The next time you will run vcbMounter it will complain that the directory already exists, so you will have to delete the directory every time before you start the backup:

rm -rf "/path/to/backup/Virtual-Machine-1"
vcbMounter -a name:"Virtual-Machine-1" -r "/path/to/backup/Virtual-Machine-1"

But there is another problem which will cause vcbMounter to complain: For every backup vcbMounter generates a snapshot and will not remove it after backup. What we need is to delete the snapshot before we backup:

vmware-cmd "/vmfs/volumes/storage1/Virtual-Machine-1.vmx" removesnapshots

rm -rf "/path/to/backup/Virtual-Machine-1"

vcbMounter -a name:"Virtual-Machine-1" -r "/path/to/backup/Virtual-Machine-1"

We delete the snapshots for a given virtual machine using “vmware-cmd” and removesnapshots. vmware-cmd needs the path to your .vmx file of the virtual machine. It’s usually stored in /vmfs/volumes/…

vcbMounter does not expect the path to the .vmx. It only needs the name of your virtual machine.

Doing the backup on a NFS mount is also possible. You need to deactive the VMWare ESX firewall and can mount e.g. using “mount -t smbfs”.

Essential Security Tips for Windows XP

January 1st, 2009 Category: General

My personal recommendations for secure internet usage are easy and help a lot to avaid getting infected with unwanted software like a virus or trojaner. So take the following tips to heart:

  • Activate Windows update and always install the updates
  • Use a firewall/router. Best case is e.g. a hardware DSL router. If now hardware firewall can be used activate at least the Windows firewall
  • Use a secure browser and mail reader like Firefox and Thunderbird
  • Install a virus scanner which automatically updates it’s signatures

Using this few tips you are already quite secure and it’s not much effort.