Backup ESX(i) to a USB drive with MKSBackup

SETUP MKSBackup with a USB drive

Don’t forget to backup your current situation before you try this free backup solution.
A good alternative for a secure free backup before you start is posted here: Trilead esxi Backup !!!!!

MKSBackup is a free VMware ESX and VMware ESXi  backup solution.  MKSBackup is based on ghettoVCB and developed in Python. The program is crossplatform so it will work with Microsoft Windows, Linux and other Unix systems. MKSBackup is driven by a Command line interface and the jobs are defined in an INI file. Its main feature is to send an email report including log files and hints that could give the user confidence about the status of the backup

( This how-to is preformed in Microsoft Server 2008 )

To connect MKSBackup to a USB drive, you first need to setup a functional FTP server. MKSBackup has a built-in FTP server but it is not stable enough.
Read the following post about my FTP server setup: Setup FileZilla for MKSBackup

Download MKSBackup

You can Download a fresh installation of MKSBackup with ghetto from (http://www.magikmon.com/mksbackup) or just download my preconfigured version from here  –> MKSBackup preconfigured (876) <–

This how-to will continue on my preconfigured version !

Setup MKSBackup

The zip file contains a folder called: Magik. Place this folder on the root of your harddrive.For example: C:\Magik.
Inside the Magik folder are 5 different folders.
– The MKSBackup folder with the python written Backup tool.
– The vmware folder with the ghettoVCB tool.
– The Monday folder contains the ini file for the monday backups.
– The Sunday folder contains the ini file for the sunday backups.
– The Wednesday folder contains the ini file for the Wednesday backups.

To backup different vms during the week you need to create new INI files. If you want to make more backups then you just have to copy one of the INI folders and use it as a template.

Configure the INI files

The files monday.ini , sunday.ini and wednesday.ini are all the same except for the line vm_list.
This value represents the Virtual Machines inside ESX(i) that must be backuped.

smtp_host= The smtp adres of a mail server you can use for the e-mail reports.
sender = Senders e-mail adrs.
Recipients = Recipients e-mail adres.program = ghettovcb (leave this).
host = ESXi server host adres.
port = portnumber for SSH to the ESX(i) server. (read here how to enable SSH)
login = SSH root user.
password = SSH password.
local = The place were the downloaded Magik folder is stored.
vm_list = Are the Virtual Machine that must be backuped.
destination = The ftp server destination. Change the username/password and ip-adres.

 Configure ghettoVCB

Open the vmware folder inside the Magik folder.
The vmware folders has three files:
– ghettoVCB.conf
– ghettoVCB.sh
-ghettoVCB-vm_backup_configuration_template

Open the file ghettoVCB.conf with a program like notepad.
Alter the following value:
VM_BACKUP_VOLUME : This is the place on the VMware ESXi server were all the files will be backup to before the MKSBackup script will download them to the USB drive. Fill in the path of a datastore with enough space to store the backups before they are downloaded.

 Test MKSBackup

Before you schedule the backup tasks in Windows you have to try if the current setup is working properly.
Create the following BAT file and run the task:

If everything is going well, it will be like this:

mksbackup

Schedule the MKSBackup task

1. Open the windows Task Schedular
2. Click on Create Task..
3.The General Tab:  Name the task, Give a Description, let the task run wheter is logged on or not and dont forget to mark Run with highest privileges.
backup monday

4. The Trigger tab: Create a trigger for once a week on monday. (or any other time you prefer)
5. The Action tab:

-Action:Start a program
– Program/script: C:\Magik\MKSBackup\mksbackup.exe
– Arguments: -q -l “C:\Magik\Monday\monday.log” -c “C:\Magik\Monday\monday.ini” backup VMWARE_FROM_WINDOWS

6. Hit OK and close the Scheduler.

This example is made for a 3day backup with MKSBackup, but you can create a much INI files and scheduler jobs as you want. But don’t run two jobs at the same time.

Don’t forget to backup your current situation before you try this free backup solution.
A good alternative for a secure backup before you start is posted here: Trilead esxi Backup

Leave a Reply

Your email address will not be published. Required fields are marked *

-->