• Using XSIBackup to backup VM’s to a NAS

    I was looking for a good solution to make backups of the different VM Guests that I have on my ESXi server and I ran across XSIBackup and love it.   I have it set to make full backups onto my NAS every Saturday in the early morning and I keep 2 weeks of backups.  I do daily backups of my files with Bacula so this is mainly for a disaster situation such as my RAID failing or something else.  The system has worked without a flaw for about 5 months now and I’ve used the backups on a few occasions and they work perfectly.

    The software installs on the ESXi host machine and is easily configured in one file.  Configuration is super easy and only takes a couple of minutes to get it up and running once you understand the logic.  I have a mix of different guest machines using Linux and Windows.  I make HOT backups of the Linux machines and COLD backups of the Windows machines.  The system will shut down the Windows guest, make the backup and then power them back on which is nice because it refreshes my Windows systems.  It actually creates a snapshot of the VM and then creates a full VM of the snapshot and them copies this over to storage.  The Windows guests take a little longer to backup but it’s less than 20 minutes.  The Linux guests are much faster and only take a couple of minutes.  I have 5 Linux servers on another system that only take 7 minutes to complete.

    You can download XSIBackup here: http://33hops.com/blog-main.asp?topic=xsibackup&lang=EN&f=xsibackup.zip

    The installation instructions are written very well and you shouldn’t have any issues installing it.  I mapped a NFS share to the datastore of the ESXi server in order to store the backups onto my NAS for safe keeping.

    Installation

    I simply use sFTP to upload the xsibackup into my datastore directory.  Once it’s there, enable SSH on your ESXi server and connect to it.

    Once there, change the directory to your xsibackup directory.

    cd /vmfs/volumes/datastore1/xsibackup

    Now change the permissions of the xsibackup file by using

    chmod 0700 xsibackup

    Now install cron by using

    ./xsibackup –install-cron

    NOTICE…  I recently tried using the above code and received an error.  I had to use cd – to go back to the root directory and use the following in order to get it to work.

    /vmfs/volumes/datastore1/xsibackup/xsibackup –install-cron

    Now modify the xsibackup-cron file and your system will backup your VM Guests!

     

    My xsibackup-cron file looks like:

    #!/bin/sh
    # This is your XSIBackup crontab, you can add your backup sechedules here.
    # You can use regular XSIBackup commands appending the parameter –time=”Day HH:mm”, i.e. –time=”Mon 21:57″
    # Run this by using ./xsibackup not just /xsibackup
    # Time is UTC to 7:00 is actually 2:00am etc….

    ############# This actually deletes backups older than 2 weeks #####################

    find /vmfs/volumes/Nas_Backups/ESXI_Backups/* -maxdepth 1 -type d -mtime +15 -exec rm -rf {} \;

    ############## Not the schedules to do the backups of the VM’s #####################

    cd /vmfs/volumes/datastore1/xsibackup/ && ./xsibackup  –time=”Sat 07:00″ –backup-point=/vmfs/volumes/Nas_Backups/ESXI_Backups  –backup-how=hot  –backup-type=custom   –backup-vms=”CentOS7 Webserver,Untangle”  –mail-from=xxxx@yyyyyyyyy.com  –mail-to=xxxx@yyyyyyyyy.com –smtp-srv=relay.mailserver.com –smtp-port=2525

    cd /vmfs/volumes/datastore1/xsibackup/ && ./xsibackup  –time=”Sat 07:30″ –backup-point=/vmfs/volumes/Nas_Backups/ESXI_Backups  –backup-how=cold  –backup-type=custom   –backup-vms=”iTunes Server”  –mail-from=xxxx@yyyyyyyyyy.com  –mail-to=xxxx@yyyyyyyyy.com –smtp-srv=relay.mailserver.com –smtp-port=2525

    cd /vmfs/volumes/datastore1/xsibackup/ && ./xsibackup  –time=”Sat 08:30″ –backup-point=/vmfs/volumes/Nas_Backups/ESXI_Backups  –backup-how=cold  –backup-type=custom   –backup-vms=”Homeseer”  –mail-from=xxxx@yyyyyyyyy.com –mail-to=xxxx@yyyyyyyyy.com –smtp-srv=relay.mailserver.com  –smtp-port=2525

     

    One thing that threw me for a loop was how the ESXi server uses UTC time so you will need to find the time of your ESXi system and adjust your cron file accordingly.  If you SSH into the EXSi server, you can type in date and the server will display the current date and time.

    date

    Once I made these time adjustments, the system worked perfectly.

    I highly recommend this software for anyone looking for a great solution to make backups of your ESXi guests VM’s.  It’s easy, it works and you can’t beat the price.  If you find it useful, make a donation to the author using the Donate button here: http://33hops.com/xsibackup-vmware-esxi-backup.html

     

Comments are closed.