good evening
Today Irecognized that a VM Snapshot (excusea checkpoint) canbe exported withWindows Server2012R2.
The subsequentimportresulted in a
functionalVMinsavedstate.
Question:What concerns a backup to a deduplicated Drivewith the followingPowerShellcommands?
# Backup running VM's on a hyper-v 2012R2
# (p) by steini'14
$rootPath = "I:\VMBackup"
#create Backup Path of the Day
$path = new-item -ItemType Directory -Path "$rootPath\$(Get-Date -f yy_MM_dd_HH-mm)"
# Do Snapshot and export and "Merge!" Snapshot/Checkpoint for each vm on this host.
foreach ($vm in get-vm){
write-host "Start: $($vm.Name)"
$snap = $vm |checkpoint-vm -SnapshotName "BackupJob $(Get-Date -f yy_MM_dd_HH-mm)" -Passthru
$snap | Export-VMSnapshot -Path $Path.FullName
$snap | Remove-VMSnapshot
}
Start-DedupJob -Volume $path.Root -Type Optimization -Wait
#PrepareDisk:
#Add-WindowsFeature -name FS-Data-Deduplication
#Enable-DedupVolume I:
#Set-DedupVolume g: -MinimumFileAgeDays 0
#Start-DedupJob -Volume i: -Type Optimization -Wait