Restore a DB2 Database
Select
This operation is used to Restore a DB2 Backupset
- application/json
Request Body
taskInfo object required
associations object[] required
clientName stringinstanceName stringdisplayName stringbackupsetId integer requiredID of the backupset
_type_ string requiredinstanceId integer requiredID of the instance
backupsetGUID stringclientId integer requiredID of the client
appName stringDB2
backupsetName stringapplicationId integer requiredPossible values: [
37
,62
]application ID for DB2 Unix is 62 and application ID for DB2 windows is 37
entityInfo object
companyId integercompanyName stringmultiCommcellId integerisDefaultBackupSet booleanentityName stringIt will be in the format of InstanceName/BackupsetName
commCellId integertask object required
taskType integer required1 for backup / restore
initiatedFrom integersubTasks object[] required
subTask object required
subTaskType integer required3 for restore
operationType integer required1001 for inplace / out of place restore , 1005 for restore to disk
options object
restoreOptions object required
browseOption object
commCellId integertimeRange object
pass this if you to browse based on specific timestamps
fromTime integerstart timestamp
toTime integerend timestamp
mediaOption object
mediaAgent object
Pass this object to restore data from specific media agent
mediaAgentId integerPass ID of media agent from which data should be restored
destination object
destination client details
destClient object
clientName stringinstanceName stringdisplayName stringbackupsetId integerdestination backupset ID (necessary only for Inplace restore)
_type_ integerinstanceId integerDestination instance ID
backupsetGUID stringclientId integerDestination Client ID
appName stringDB2
backupsetName stringapplicationId integerentityInfo object
companyId integercompanyName stringmultiCommcellId integerisDefaultBackupSet booleanentityName stringcommCellId integerdestinationInstance object
Details of destination instance
clientName stringinstanceName stringdisplayName stringbackupsetId integerID of the destination backupset (pass only if the backupset is already present in command center)
_type_ integerinstanceId integerDestination Instance ID
instanceGUID stringbackupsetGUID stringclientId integerDestination client ID
appName stringDB2
backupsetName stringapplicationId integerentityInfo object
companyId integercompanyName stringmultiCommcellId integerisDefaultBackupSet booleanentityName stringcommCellId integerselected booleanTrue for out of place restore , False for inplace restore
destPath string[]Use this to pass destination path where backup image should be restored in case of restore to disk
oracleOpt objectfileOption object
sourceItem string[]Pass the tablespaces to restore , pass the job id's in case of Restore to disk
impersonation object
pass this object if you want to impersonate user
impersonateUserName stringusername of user you want to impersonate
impersonatePassword stringpassword of the user
impersonation booleanTrue if you are trying to impersonate else False
commonOptions object
restoreToDisk booleanTrue if you are doing restore to disk
indexFreeRestore booleanTrue in case of restore to disk
jobIds integer[]Pass jobid's in case of restore to disk
db2Option object required
rollForward booleanTrue if you want to rollforward DB
rollForwardPending booleanTrue if you want to leave DB in rollforward pending mode
rollForwardTime object
pass this object if you to rollforward to a specific point in time
time integerTimestamp until which DB should be rollforwarded
rollForwardToEnd integerPossible values: [
1
,0
]1 if you are rollforwarding DB to end of logs else 0
useAlternateLogFile booleanTrue if you want to pass alternate log file path
alternateLogFile stringPass the alternate log file path using this parameter
rollForwardDir stringpass the overflow log directory using this parameter
restoreArchiveLogs booleanTrue if you want to do log restore
logTimeStart booleanTrue if mentioned starting timestamp of log restore
logTimeEnd booleanTrue if mentioned ending timestamp for log restore
archiveLogTime booleanTrue if you want to restore logs based on timestamp
logTimeRange object
pass this object to pass log restore timestamps
fromTime integerStarting timestamp
toTime integerEnding timestamp
useLogTarget booleanTrue if you want to use log target option
useLatestImage booleanTrue if you want to use latest backup image
redirect booleanTrue if you want to redirect tablespaces or storage groups
restoreData booleanTrue if you to want to restore data
recoverDb booleanTrue if you to want to recover DB (only applicable for inplace)
useSnapRestore booleanTrue if you want to do snap restore
restoreIncremental booleanrestoreType integer0 for full db restore , 1 for subset restore
restoreOnline booleanTrue for subset restore , False for full db restore
targetDb stringTarget DB name for restore
targetPath stringpass DB path where it should be created if target DB is not present inside client
storagePath booleanredirectAllTableSpacesSelected booleanredirectAllItemsSelected booleanredirectItemsPresent booleanTrue if you to redirect
redirectInfo string[]pass the tablespaces and the path where you want them to redirect
redirectStorageGroups booleanTrue if you want to redirect storage groups
storageGroupInfo object
pass this object with storage groups to redirect
storageGroup object[]
pass storage group objects
groupName stringstorage group name
stoPaths string[]path to redirect storage group
commonOpts object
notifyUserOnJobCompletion booleanTrue if you want to get notified post job completion
prePostOpts object
pass this object if you want to execute any pre or post commands
preRecoveryCommand stringpath to pre recovery command file
postRecoveryCommand stringpath to post recovery command file
runPostWhenFail booleanTrue if you want to run post recovery command even if job fails
impersonation object
pass this object if you want to impersonate user to run pre and post recovery commands
level integeruser object
pass user details in this object for pre post command user impersonation
userName stringUsername
password stringBase64 encoded Password
confirmPassword stringConfirm password
- 200
- 400
- 401
- 403
- 500
OK
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
- taskId integer
- jobIds string[]
{
"taskId": 0,
"jobIds": [
"string"
]
}
{
"taskId": 72815,
"jobIds": [
"3598986"
]
}
Bad Request
- application/json
- Schema
- Example 1
Schema
- string
Request body is empty or format is invalid.
Unauthorized
Forbidden
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
- errorMessage string
- errorCode integer
{
"errorMessage": "string",
"errorCode": 0
}
{
"errorMessage": "Security check failed. Invalid SubTask Type.",
"errorCode": 587204044
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
- errorMessage string
- errorCode integer
{
"errorMessage": "string",
"errorCode": 0
}
{
"errorMessage": "Failed to create task.",
"errorCode": 587204001
}