I’m trying to find a suitable backup option for some VM’s I am setting up under esxi. Ideally I’d like those to be backed up each to an Amazon EC2 instance, so that if the primary machine ever fails, I can swap over to a cloud machine.
I stumbled across Vertical Backup, and it looks like it may do this, but I am not clear on exactly how. I’ve reviewed the “guide” but that document doesn’t really say anything about what happens at the destination end where backups are received.
Can you provide guidance as to the following:
How the restore process works
How the restore process would fit in with a failover scenario to a cloud VM?
You’ll find all files related to the virtual machine myvm have been restored under \path\to\restore. You can now add that virtual machine to in vSphere client.
If later you create another backup for myvm on host1:
vertical backup myvm
Then run this command on incrementally update the new vm on host2:
Hi gchen, yes, that is helpful. However, it leaves me with several questions too:
I would like to back up VM’s to a MacOS host that is running VMware Fusion. I have gotten the esxi machine connected and backing up to the Mac via SFTP. The question is, how do I restore on the MacOS machine? Do I use “duplicacy” on the Mac?
Your instructions imply that the recipient machine will also be esxi. Maybe I am missing something, but it seems like on Amazon EC2, one does not run esxi, instead, one imports a VM to their AMI format. So the backup would need restoring somehow within the virtual machine, not as a part of esxi…? I am relatively new to the VM-in-the-cloud world, so excuse me if I’m missing something about how I could make this work to have a “failover” VM running in the cloud.
Okay, not a person to wait, I tried using duplicacy on the target mac - both command line and gui - to see if I can use it to restore from the vertical backup. I can’t get it to work.
I had to create a “fake” repository to get either one to initialize. So I went ahead an initialized them, pointing them to the same data store being used for my vm backup.
However, I cannot figure out how to get either the command line or gui to recognize the already existing backup of the VMs created by vertical backup.
The question is this: How can I get a backup of a VM that’s from an esxi host, restored onto a non-esxi machine?
You’re almost there. If you create the fake repository using ‘myvm@host1’ as the repository id then you will be able to restore backups created for myvm on host1:
duplicacy init myvm@host1 s3://mybucket
duplicacy list
duplicacy restore -r 1
I’ve never tried importing an ESXi vm to Amazon EC2. The problem with that in my opinion is that you can’t convert the disk image incrementally. If you get a dedicated server capable of running ESXi from elsewhere like OVH or Hetzner, then it will be much faster to update an existing vm on your backup host (both Vertical Backup and Duplicacy support incremental restore).
The storage ‘/Volumes/BlueSky2/VM/backup/’ has already been initialized
Compression level: 100
Average chunk size: 1048576
Maximum chunk size: 1048576
Minimum chunk size: 1048576
Chunk seed: 766572746963616c6261636b7570
/Volumes/TheBlueSky will be backed up to /Volumes/BlueSky2/VM/backup/ with id webuzo-lower-ed1@esximini1
But there’s nothing there!
duplicacy list
Storage set to /Volumes/BlueSky2/VM/backup/
Not sure how to proceed?
I understand your point about VM backups to EC2. I do have a possible other option of a second server. However, I will also want to make the backups to my mac. I hope you can help make this easier.
The repository is the directory to be backed up, and since you ran the init command under /Volumes/TheBlueSky, that became the repository. The init command will create a hidden subdirectory .duplicacy under the repository, and if you run the init command it will complain that the repository /Volumes/TheBlueSky has been initialized. By removing the .duplicacy subdirectory you will be able to initialize the repository again.
So in your case you should create a subdirectory under /Volumes/TheBlueSky to be used as the repository:
cd /Volumes/TheBlueSky
mkdir VMs
cd VMs
rm -rf .duplicacy
duplicacy init webuzo-lower-ed1@esximini1 /Volumes/BlueSky2/VM/backup/
duplicacy list # should show you backups created from your ESXi
I tried as you suggested. It seemed to proceed, then I got an error:
> duplicacy restore -r 1
Storage set to /Volumes/BlueSky2/VM/backup/
Restoring /Volumes/TheBlueSky/VMs to revision 1
Downloaded vmfs/volumes/datastore1/webuzo1/Webuzo.vmdk (526)
Downloaded vmfs/volumes/datastore1/webuzo1/owncloudConv.vmdk (525)
File vmfs/volumes/datastore1/webuzo1/owncloudConv-flat.vmdk has a mismatched hash: e7c5fca5119f94deb6e9635e72eb217a16bdd7da8d1eb6bd103c50ee80a7b1f1 instead of #ff5f259c0c589426f8c6e3f05ebc75c8a6e79afd9c81a26ae42b0a37749e8e80
I have no idea what went wrong… what shall I try next?
This is because Duplicacy and Vertical Backup use different ways to calculate the file hash, and the leading # means it is the one used by Vertical Backup. However, Duplicacy 2.0.0+ should correctly accept hashes created by Vertical Backup. Any chance you’re running an old version?
I just downloaded the duplicacy_osx_x64_2.0.3 from your releases page yesterday. That was the version I was using. I’ve never had duplicacy on any of my systems before yesterday.