Skip to content

Latest commit

 

History

History
138 lines (117 loc) · 4.9 KB

5.5. Compute - Virtual machines (VMs) - Backups.md

File metadata and controls

138 lines (117 loc) · 4.9 KB

Backups

VM Disk Snapshots

  • .VHD files (data + os disks in page blobs) are stored as page blobs.
  • Full and incremental point-in-time snapshots
  • Faster than performing full back-ups
    • 💡 The difference is that snapshots are deltas
  • Supported in
  • Managed disks
  • Unmanaged disks
    • Use AzCopy command line tool to archive to another storage account
  • ❗ Snapshots cannot outlive their sources blob
  • If you delete VMs, snapshots become irrelevant
    • 💡 Consider archiving them
  • You can create new VM from a snapshot.
  • In Portal -> VM -> Disks -> Select Disk -> Create Snapshot
  • In Snapshots -> Find snapshot ->
    • Export:
    • You export with creating SAS URL (time limited)
    • You get direct URL

Azure VM Backup

MARS, Microsoft Agent Recovery Services

  • Supports on-prem to cloud
  • Supports file/folders but not whole disk back-up

System Center DPM (Data Protection Manager)*

  • Supports system image/whole VM back-ups from on-premises to Azure

Azure Backup Server (MABS, Microsoft Azure Backup Server)

  • Azure specific version of System Center DPM

Azure Backup

  • Azure IaaS VM Backup
  • Require recovery services vault
    • Don't need to worry about storage accounts
  • Azure Backup service uses VMSnapshot and VMSnapshotLinux extensions
  • VSS orchestrates consistent snapshots of OS and data disks.

Consistency levels

  • Application-consistent
    • 💡 Preferred backup type
    • Data is consistent with time of backup (VSS)
  • File-system consistent
    • Ensures the VM boots and there is neither corruption nor data loss
    • You may need to take further action to bring data current
  • Crash-consistent
    • Least preferred backup type
    • Used when you back up a powered down VM

Manage

  • VM -> Backup ->
    • Create/select recovery services vault
    • Create back-up policy with backup frequency and retention range
  • You can see/start/stop back-ups in Recovery Services vault -> Backup Items
    • You can create policies in Backup Policies blade.
  • In back-up/replication jobs blade you can list all jobs

Restore options

  • Create a new VM
    • Basic VM up and running from a restore point
  • Restore disk
    • Restores a VM disk which can then be used to create a new VM.
    • Azure Backup provides a template to help you customize and create a VM.
    • Useful if you want to customize the VM, add configuration settings that weren't there at the time of backup, or add settings that must be configured using the template or PowerShell.
  • Replace existing
    • You can restore a disk, and use it to replace a disk on the existing VM.
    • Supported for unencrypted managed VMs
    • ❗ Not supported for unmanaged disks, generalized VMs, or for VMs created using custom images.

Recovery Options

  • Entire VM
    • OS and data disks
    • Configuration
    • Restore to original or alternate location
    • Quick create option
    • Flow: Recovery Services Vault -> Restore VM -> Restore type: Create VM
  • Individual Disks
    • Restore to storage account
    • Includes ARM deployment template
    • 💡 Use to control VM restore, gain full control over the VM environment
      • Availability set
      • vNIC
      • IP addresses...
    • Flow
      1. Recovery Services Vault -> Restore VM -> Restore type: disks
      2. Restore VHD(s) to storage account
      3. Create VM configuration
      4. Attach the OS and data disks
  • Files and Folders
    • Mount OS and data disks as network drives
    • Azure VM File Recovery
      • E.g. "We need to retrieve a few log files from 3 months ago. Time is of the essence"
        • If it was a VM back-up, it'd be costly as it takes storage etc.
        • With file recovery you can only recover log folders
      • Workflow
        • Select recovery point
        • Download and run PowerShell script
        • Recover file system
        • Unmount the disks after recovery
      • Manage in Recovery Service Vault -> File Recovery

Azure Site Recovery

  • Replication/orchestration engine
  • Failover recovery for VMs
  • You can use cloud <=> cloud, on-prem <=> cloud, on-prem <=> on-prem
  • Provides region level failover
  • Physical and virtual (Hyper-V and/or VMware) machines are supported
  • Azure as a recovery site
  • Migrate to Azure
  • Manage in VM -> Disaster Recovery or Recovery Services vault -> Site Recovery (or Recovery Services vault -> Disaster Recovery especially for VMs)
    • Select target region
    • Select target resources (e.g. VNEt, availability set, RG) to new resources or existing
    • You can set storage, replication and extension settings
    • With a recovery plan you can set recovery order, inject code in-between VMs
      • You need to do it Recovery services vault
  • Failover/Failback
    • In VM -> Disaster Recovery ->
      • Select Test failover or Failover
      • Click on "Commit"
      • Re-protect -> Go back to the original location
    • Flow:
      1. Prerequisite check
      2. Failover
      3. Create recovery point
      4. Start the VM
      5. Clean-up resources