Backup Microsoft Azure Virtual Machine
Asked Answered
M

1

6

I currently have a Rackspace Cloud Server that I'd like to migrate to an Azure Virtual Machine. I recently got an MSDN subscription which gives me a certain level of hosting via Azure at no cost, where I'm currently paying for that level of service with Rackspace.

However, one of the nice things about Rackspace is that I can schedule nightly/weekly backups of the VM image. Is there any mechanism for doing this on Azure? I'm worried about protecting against corruption of the database (i.e. what if someone were to run an UPDATE statement and forget the WHERE clause). Is there a mechanism for this with Azure?

I know the VMs are stored as .VHD files in my local Azure storage, but the VM image is 127 gigs. Downloading that nightly even with FIOS internet isn't really going to fly as a solution.

Mcdougald answered 1/4, 2013 at 14:2 Comment(0)
G
5

You can perform an asynchronous blob copy to make a physical copy of a vhd. See here for REST API details. This operation is very fast within the same data center (maybe a few seconds?). You don't need to make raw REST calls though: There's a method already implemented in the Azure cross-platform command line interface, available here. The command is:

azure vm disk upload

You can also take blob snapshots, and return to a previous snapshot later. A snapshot is read-only (which you can copy from later) and takes up no space initially. However, as storage pages are changed, the snapshot grows.

One question though: why such a large VM image? Are you storing OS + data on same vhd? If so, it may make more sense to mount a separate Azure Drive (also stored in VHD in blob storage) to store data, and make independent copies / snapshots.

Glabrous answered 1/4, 2013 at 14:40 Comment(1)
No, I actually have the OS on the 127 gig partition and mounted a separate Azure Drive for data, like you suggested. I just created a "Medium" sized instance of the Azure VM and that was the size it created by default. I'd be open to trashing the VM and recreating it again if I could whittle that down to make backups more efficient.Mcdougald

© 2022 - 2024 — McMap. All rights reserved.