hyper-v backup & restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups,...

12
Hyper-V Backup & Restore Microsoft IT Camps - Virtualization

Upload: others

Post on 09-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

Hyper-V Backup & Restore

Microsoft IT Camps - Virtualization

Page 2: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

Hyper-V VM Snapshots Snapshots • A point-in-time copy of a virtual

machine

• Do not affect the running state of a virtual machine

• Snapshot any guest OS

• VM can be running, off, stopped or saved, but not paused

• In VMM, snapshots are called “checkpoints”

Snapshot files

• VM configuration .XML file (*.xml)

• Save state files (*.vsv)

• VM memory contents (*.bin)

• Snapshot differencing disk (*.avhd)

Page 3: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

Snapshot Workflow

• Pause the VM

• Create differencing disk for VHD

• Make a copy of the VM configuration file

• Resume the VM

• Save contents of the VM to disk

Page 4: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

Snapshot Design Considerations • Should not be used in production environments

– No good for time-sensitive services (AD) or replication

• Should be used in testing and training environments • May consume a significant amount of hard disk space • Can have unexpected results when deleted • Cannot be used with

pass-through disks • Configure storage location

before taking first snapshot

Page 5: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

Managing Hyper-V Snapshots • Create snapshot • Apply – Erases current state but prompts

to take a new snapshot) • Revert – Returns VM to last snapshot • Delete – Will not impact other snapshots

– Deleting subtree removes all down-level snapshots

• Merging – Deleting current snapshot will merge with parent

• Settings – Can only update name & notes • Rename • Export

Page 6: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

Backup & Restore Overview • VMs contain a single file (VHD) for the OS

– Easier to backup; Offline backup easy – just copy VM files to another location – Cannot restore individual files

• Consider online backups – Install integration services (and backup integration service) – Must use NTFS. FAT32 and dynamic disks not supported – Enable Volume Shadow Copy Service (VSS) on all volumes the VM uses

• Host backups – Backup / restore all except virtual networks (incl. VM configuration, snapshots, VHDs

• Guest backups – Granular file / application level backup – Use before, and in addition to full (host) backup

Page 7: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

B&R with Volume Shadow Copy Service

• VSS is most common way to prepare backups

• Backup with no downtime

• Windows Server 2003+

• VSS Requestor (backup utility) requests

• VSS Provider freezes application data

• CLI: DiskShadow

Requestor (Backup utility)

VSS Writer (Application)

Provider (Storage software or hardware)

Storage Storage

Physical Host (Parent Partition)

Requestor (Backup utility)

VSS Writer (Application)

Provider (Storage software or hardware)

Storage (in VHD) Storage (in VHD)

Contemporary Windows VM

Non-VSS aware VM

Storage (in VHD) Storage (in VHD)

Processes in memory

Page 8: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

B&R with Windows Server Backup • Uses VSS • Must add a registry key for Hyper-V VSS writer GUID

– HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT \CurrentVersion\WindowsServerBackup

• WSB is volume-based backup – Must backup all volumes that host VM files

• Online backup, unless – Integration Services not installed – OS does not support VSS – Dynamic Disks

• WSB does not support Cluster Shared Volumes (CSV)

Page 9: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

B&R with VMM 2008 R2 • Backup VMs using checkpoints • VMM Console Backup

– SQL database (user accounts, configuration data) – Configure in GUI: Administration General Actions

• Other Backup Solutions – Virtual Machine Manager Server

• Create system state backup so server can be recreated using the same SID

– Hosts, VMs, Host configuration data (virtual networks) – Library server data, Virtual hard disks – ISO images

• Other Considerations – Backup VMM database from Administrator Console – Restore VMM database using scvmmrecover.exe Hosts

Page 10: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

B&R with Data Protection Manager 2010

• Host-based protection – Protect or recover the whole machine; Bare metal recovery – Single DPM 2007 SP1 agent and license on host – Protect non-Windows servers and older Windows operating systems

• Guest-based protection – Protect and recover granular data: SQL Server databases, Exchange

storage groups, SharePoint farms, folders, and files

• Recover to original location or alternative location • Addition Backup & Restore capabilities described in the System

Center Data Protection Manager 2010 module

Page 11: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

B&R with Clustered Virtual Machines

• Cluster disks must be online • DPM 2010 recommended

– Supports Exchange, File Server & SQL – During agent installation, offered option to install agent on

other nodes

• Cluster Shared Volumes – WSB & DPM 2007 does not support CSV

• Use DPM 2010 or 3rd party

– Move VM to “Coordinator Node” to avoid redirected I/O

Page 12: Hyper-V Backup & Restoredocshare01.docshare.tips/files/13489/134890141.pdfstorage groups, SharePoint farms, folders, and files • Recover to original location or alternative location

Takeaways

• Snapshots and checkpoints are an easy backup and restore solution for non-production environments

• For backup and restore in production it is recommended to use one of the many VSS-based solutions

• Backup both the host and guest VMs