HP Matrix 7.2 KVM Private Cloud Backup and Restore
Table Of Contents
- Abstract
 - Matrix Operating Environment with Matrix KVM Private Cloud Overview
 - Backup and restore strategy for Matrix OE with Matrix KVM Private Cloud
 - Matrix KVM Private Cloud backup and restore
 - Matrix KVM Private Cloud Images repository backup and restore
 - Matrix KVM Private Cloud High Availability (HA) cluster configuration backup and restore
 - Appendix A: KVM Private Cloud restore resynchronization actions
 - Appendix B: Images repository restore resynchronization actions
 - Appendix C: Alerts and Audit messages
 - Appendix D: HA Cluster details
 - Appendix E: Backup and Restore REST API
 - Appendix F: Sample Backup Script
 - Appendix G: Sample Restore Script
 - References
 - For more information
 

 { 
 $continue = 1 
 } 
 } while ($continue -eq 0) 
 do 
 { 
 Write-Host "Enter directory backup is located in (ie: C:\users\joe\)" 
 $backupDirectory = Read-Host 
 # Add trailing slash if needed 
 if (!$backupDirectory.EndsWith("\")) 
 { 
 $backupDirectory = $backupDirectory + "\" 
 } 
 Write-Host "Enter name of backup (ie: appliance_vm1_backup_2012-07-07_555555.bkp)" 
 $backupFile = Read-Host 
 # Check if file exists 
 $fullFilePath = $backupDirectory + $backupFile 
 if (! (Test-Path $fullFilePath)) 
 { 
 Write-Host "Sorry the backup file $fullFilePath doesn't exist." 
 } 
 } while (! (Test-Path $fullFilePath)) 
 Write-Host "Enter appliance IP address (ie: https://10.10.10.10)" 
 $hostname = Read-Host 
 # Correct some common errors 
 $hostname = $hostname.Trim().ToLower() 
 if (!$hostname.StartsWith("https://")) 
 { 
 if ($hostname.StartsWith("http://")) 
 { 
 $hostname = $hostname.Replace("http","https") 
 } else { 
 $hostname = "https://" + $hostname  
 } 
 } 
 Write-Host "Enter username" 
 $secUsername = Read-Host -AsSecureString 
 $username = 
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStr
ingToBSTR($secUsername)) 
 Write-Host "Enter password" 
 $secPassword = Read-Host -AsSecureString 
 $password = 
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStr
ingToBSTR($secPassword)) 
 $absolutePath = $backupDirectory + $backupFile 
 $loginVals = @{ hostname = $hostname; userName = $username; password = $password; backupPath 
= $absolutePath; backupFile = $backupFile; } 
 return $loginVals 
} 
##### Send the login request to the appliance ##### 
function login-appliance ([string]$username,[string]$password,[string]$hostname) 
{ 
 <# 
 .DESCRIPTION 
 Attempts to send a web request to the appliance and obtain a authorized sessionID. 
 .PARAMETER username 
 The username to log into the remote appliance 
 .PARAMETER password 
 The correct password associated with username 
 .PARAMETER hostname 
 The appliance address to send the request to (in https://{ipaddress} format) 
 .INPUTS 
 None, does not accept piping 










