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
 

#loops to keep checking how far the backup has gone 
$taskResource = waitFor-completion $taskManager $authValue.sessionID $hostname 
if ($taskResource -eq $null) 
{ 
 if ($global:interactiveMode -eq 1) 
 { 
 Write-Host "Could not fetch backup status" 
 } 
 Write-EventLog -EventId 100 -LogName Application -Source backup.ps1 -Message "Could not fetch 
backup status" 
 return 
} 
#gets the backup resource  
$backupResource = get-backupResource $taskResource $authValue.sessionID $hostname 
if ($backupResource -eq $null) 
{ 
 if ($global:interactiveMode -eq 1) 
 { 
 Write-Host "Could not get the Backup Resource" 
 } 
 Write-EventLog -EventId 100 -LogName Application -Source backup.ps1 -Message "Could not get 
the Backup Resource" 
 return 
} 
#downloads the backup file to the local drive 
$filePath = download-Backup $backupResource $authValue.sessionID $hostname 
if ($filePath -eq $null) 
{ 
 if ($global:interactiveMode -eq 1) 
 { 
 Write-Host "Could not download the backup" 
 } 
 Write-EventLog -EventId 100 -LogName Application -Source backup.ps1 -Message "Could not 
download the backup" 
 return 
} 
if ($global:interactiveMode -eq 1) 
{ 
 Write-Host "Backup can be found at $filePath" 
 Write-Host "If you wish to automate this script in the future and re-use login settings 
currently entered," 
 Write-Host "then provide the file path to the saved credentials file when running the 
script." 
 Write-Host "ie: " $MyInvocation.MyCommand.Definition " filepath" 
}  
else 
{ 
 Write-Host "Backup completed successfully." 
 Write-Host "The backup can be found at $filePath." 
} 
Write-EventLog -EventId 0 -LogName Application -Source backup.ps1 -Message "script completed 
successfully" 
Example Output 
Enter Appliance name (https://ipaddress) 
https://10.10.10.10 
Enter Username 
************* 
Enter password 
******** 
Would you like to save these credentials to a file? (username and password encrypted) 
y 
Enter file path and file name to save credentials (example: 
C:\users\bob\machine1.txt) 
C:\users\jerry\jerry-vm.txt 
The file 'C:\users\jerry\jerry-vm.txt' already exists. 
Overwrite existing credentials for this machine? 
y 
run backup? 
y 
Login completed successfully. 
48 










