Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How do you backup an ESXi host/ESXi VMs? Preferably to Amazon S3 or similar cloud storages
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How do you backup an ESXi host/ESXi VMs? Preferably to Amazon S3 or similar cloud storages

ShigawireShigawire Member
edited February 2016 in Help

I've recently installed ESXi on my server and we've learned from our daily LET drama: always backup.

Are there any best practices of backing up ESXi guests?
Ideally I want to upload the backups to a cloud storage like Amazon's S3.

I've found some free solutions like http://www.unitrends.com/products/enterprise-backup-software/unitrends-free but this one needs a lot of resources and a dedicated VM for itself.

Others like ghettoVCB (https://github.com/lamw/ghettoVCB) seem to be cool if configured properly, but this one does not offer the ability to upload to cloud services directly.

Is it even possibly to backup VMs directly to services like S3 without saving the images temporarily on the disk?

I don't even know if it is fine to run the backup software inside a VM of the same ESXi host that should be backed up... That would require "hot" backups - is that even possible?

Thanks for some information.

Comments

  • Using Veeam here. Not free neither, but oh so nifty and quick!
    Offloading my backups to various locations. Not sure what are the specs of S3, but I'm storing my backups on iSCSI connected storage. The Veeam VM needs quite a bit of resources though yes.

  • Veeam is indeed nice from what i have seen.

  • We use Veaam for backing up our ESXI VM's but like others have said it isn't free

  • AFAIK there aren't any really good solutions for the free version of ESXi since it lacks the backup API all the commerical tools are using

  • Thanks for all your input. Well, so it's not Veeam for me then.

    By the way, it does not have to be free. I just don't want to pay $$$ either :)

  • Hot backup is possible in a roundabout way -- you use vim-cmd vmsvc/snapshot.create to take a snapshot, then you use vmkfstools to clone the VMDK files, and when that's done you remove the snapshot.

    I created a custom python script to do that, but then discovered http://33hops.com/xsibackup-vmware-esxi-backup.html which does what my script did and more, so I'd recommend giving it a look.

    Thanked by 2raindog308 Shigawire
  • I don't remember where I snatched this one but this also does the dirty work when need be:

     #!/bin/sh
    
    if [ $# != 2 ]; then
            echo "Usage: $(basename $0) <SOURCE VM PATH> <DESTINATION PATH>"
            echo "Example: $(basename $0) /vmfs/volumes/datastore1/VM1 /vmfs/volumes/datastore2"
            exit
    fi
    
    vmx=$(basename $(/bin/ls $1/*.vmx))
    name=$(grep displayName $1/$vmx | /bin/awk -F\" '{print $(NF-1)}')
    vmxf=$(grep vmxf $1/$vmx | /bin/awk -F\" '{print $(NF-1)}')
    nvram=$(grep nvram $1/$vmx | /bin/awk -F\" '{print $(NF-1)}')
    vmdks=$(grep vmdk $1/$vmx | /bin/awk -F\" '{print $(NF-1)}')
    
    echo "Started copying VM $name"
    
    vmdir=$(basename $1)
    destpath="$2/$vmdir"
    
    echo "Source path: $1"
    echo "Destination path: $destpath"
    
    echo "Creating destination path $destpath"
    /bin/mkdir -p $destpath
    
    echo "Copying configuration files:"
    echo $vmx
    /bin/cp $1/$vmx $destpath
    echo $vmxf
    /bin/cp $1/$vmxf $destpath
    echo $nvram
    /bin/cp $1/$nvram $destpath
    
    echo "Copying virtual disks:"
    for vmdk in $vmdks;
    do
            echo $vmdk
            /sbin/vmkfstools -d thin -i $1/$vmdk $destpath/$vmdk
    done
    
    echo "Completed copying VM $name"
    
    Thanked by 1Shigawire
Sign In or Register to comment.