Share via


Managed Database Restore Details - Get

Gets managed database restore details.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/Default?api-version=2023-08-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

managedInstanceName
path True

string

The name of the managed instance.

resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

restoreDetailsName
path True

RestoreDetailsName

The name of the restore details to retrieve.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

ManagedDatabaseRestoreDetailsResult

Successfully retrieved restore details.

Other Status Codes

ErrorResponse

*** Error Responses: ***

  • 400 RestoreDetailsNotAvailableOrExpired - Requested restore details are not available, or have expired.

  • 400 TimeoutDuringRestore - A timeout was encountered while trying to connect to the restore target.

  • 400 AutoCompleteMissingLastBackupName - Auto complete restore request must have lastBackupName parameter provided.

  • 400 MissingThumbprint - Can not find server certificate.

  • 400 BlobStorageServerFailure - Blob storage server failure has occurred.

  • 400 BackupSetNotFound - No backups were found to restore the database. Please contact support to restore the database.

  • 400 FullBackupNotFound - Full backup can not be found.

  • 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.

  • 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.

  • 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.

  • 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.

  • 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.

  • 400 TargetServerDoesNotExist - The target server {0} does not exist or is not ready yet. Please check that it exists and retry the restore request.

  • 400 TargetServerRestoreNotAllowed - The target server {0} is currently not in a state that allows a restore to be started.

  • 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.

  • 400 FullBackupMissingChecksum - Provided full backup is missing checksum.

  • 400 FullBackupDamaged - Provided full backup is damaged.

  • 400 MissingStripeInBackupSet - Provided backup set has one or more missing stripes.

  • 400 BackupsFromMultipleDatabasesDetectedInTheContainerWhileRestoreInProgress - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}

  • 400 BrokenRestorePlanWrongDiffBaseGUID - The restore plan is broken because DifferentialBaseGuid of diff backup does not match BackupSetGuid of full backup.

  • 400 CorruptedPagesInBackupSet - Operation was aborted because RESTORE detected one or more corrupted pages in the backup set.

  • 400 ManagedIdentityIssueDetectedWhileRestoreInProgress - Managed identity is not set up properly. Please verify and try again.

  • 400 CorruptedPagesListMaintenance - Operation was aborted because an internal error occurred while processing the backup taken without checksum.

  • 400 StorageBrokenIssueDetectedWhileInProgress - Storage connection is broken. Retrying automatically...

  • 400 PartiallyContainedDatabaseUnsupported - "Backup for a partially contained database is not supported."

  • 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.

  • 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.

  • 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.

  • 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.

  • 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.

  • 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.

  • 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.

  • 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.

  • 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.

  • 400 ExternalBackupUpgradeInProgress - The restore request cannot be completed, since upgrade is in progress.

  • 400 IncompatiblePhysicalLayoutTooManyXTPFiles - Database backup contains incompatible physical layout. Multiple files found in the filegroup that contains MEMORY_OPTIMIZED_DATA.

  • 400 BlobStorageFailure - Blob storage failure has occurred.

  • 400 BackupsFromMultipleDatabasesDetectedInTheContainerFromTheStart - There are backups from multiple databases in the container folder. Please make sure the container folder has backups from a single database.{0}

  • 400 ManagedIdentityIssueDetectedFromTheStart - Managed identity is not set up properly. Please verify and try again.

  • 400 StorageBrokenIssueDetectedAtTheStart - Storage connection is broken. Please verify and try again.

  • 400 StorageBrokenIssueDetectedTerminateRetries - Storage connection is still broken. Please verify and try again.

  • 400 BackupSetBroken - Backup set is broken.

  • 400 SqlRestoreError - Non retriable error occurred while restoring backup.

  • 400 ManagedDatabaseNotInRestoringState - Managed database is not in Restoring state.

Examples

Managed database restore details.

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/testdb/restoreDetails/Default?api-version=2023-08-01

Sample response

{
  "properties": {
    "type": "LRSRestore",
    "status": "Restoring",
    "lastUploadedFileName": "RestoreDetailsFullBlownExampleLog11.bak",
    "lastUploadedFileTime": "2022-03-01T07:54:21Z",
    "lastRestoredFileName": "RestoreDetailsFullBlownExampleLog9_1.bak",
    "lastRestoredFileTime": "2022-05-09T12:27:20.4936305Z",
    "percentCompleted": 53,
    "currentRestoredSizeMB": 25,
    "currentRestorePlanSizeMB": 47,
    "currentBackupType": "Log",
    "currentRestoringFileName": "RestoreDetailsFullBlownExampleLog10.bak",
    "numberOfFilesDetected": 25,
    "numberOfFilesQueued": 1,
    "numberOfFilesSkipped": 8,
    "numberOfFilesRestoring": 1,
    "numberOfFilesRestored": 14,
    "numberOfFilesUnrestorable": 1,
    "fullBackupSets": [
      {
        "status": "Skipped",
        "firstStripeName": "RestoreDetailsFullBlownExampleFull2.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 2
      },
      {
        "status": "Restored",
        "firstStripeName": "RestoreDetailsFullBlownExampleFull3_1.bak",
        "numberOfStripes": 3,
        "backupSizeMB": 3,
        "restoreStartedTimestampUtc": "2022-05-09T12:15:40.3143263Z",
        "restoreFinishedTimestampUtc": "2022-05-09T12:18:41.3785089Z"
      }
    ],
    "diffBackupSets": [
      {
        "status": "Skipped",
        "firstStripeName": "RestoreDetailsFullBlownExampleDiff2.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 0
      },
      {
        "status": "Restored",
        "firstStripeName": "RestoreDetailsFullBlownExampleDiff3_1.bak",
        "numberOfStripes": 3,
        "backupSizeMB": 1,
        "restoreStartedTimestampUtc": "2022-05-09T12:19:40.5455092Z",
        "restoreFinishedTimestampUtc": "2022-05-09T12:20:21.3667454Z"
      }
    ],
    "logBackupSets": [
      {
        "status": "Skipped",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog2.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 0
      },
      {
        "status": "Skipped",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog3.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 8
      },
      {
        "status": "Skipped",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog4.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 11
      },
      {
        "status": "Restored",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog5.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 7,
        "restoreStartedTimestampUtc": "2022-05-09T12:21:01.7717453Z",
        "restoreFinishedTimestampUtc": "2022-05-09T12:21:54.7557851Z"
      },
      {
        "status": "Restored",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog6.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 3,
        "restoreStartedTimestampUtc": "2022-05-09T12:22:41.8784062Z",
        "restoreFinishedTimestampUtc": "2022-05-09T12:23:03.709407Z"
      },
      {
        "status": "Restored",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog7.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 4,
        "restoreStartedTimestampUtc": "2022-05-09T12:23:36.6264066Z",
        "restoreFinishedTimestampUtc": "2022-05-09T12:23:52.9274047Z"
      },
      {
        "status": "Restored",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog8.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 3,
        "restoreStartedTimestampUtc": "2022-05-09T12:24:25.899407Z",
        "restoreFinishedTimestampUtc": "2022-05-09T12:24:37.9954063Z"
      },
      {
        "status": "Restored",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog9_1.bak",
        "numberOfStripes": 4,
        "backupSizeMB": 4,
        "restoreStartedTimestampUtc": "2022-05-09T12:25:10.8804065Z",
        "restoreFinishedTimestampUtc": "2022-05-09T12:25:27.808409Z"
      },
      {
        "status": "Restoring",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog10.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 15,
        "restoreStartedTimestampUtc": "2022-05-09T12:26:00.7813103Z"
      },
      {
        "status": "Queued",
        "firstStripeName": "RestoreDetailsFullBlownExampleLog11.bak",
        "numberOfStripes": 1,
        "backupSizeMB": 7
      }
    ],
    "unrestorableFiles": [
      {
        "name": "ImageFile.JPG"
      }
    ]
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/testdb/restoreDetails/current",
  "name": "current",
  "type": "Microsoft.Sql/managedInstances/databases/restoreDetails"
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ManagedDatabaseRestoreDetailsBackupSetProperties

The managed database's restore details backup set properties.

ManagedDatabaseRestoreDetailsResult

A managed database restore details.

ManagedDatabaseRestoreDetailsUnrestorableFileProperties

The managed database's restore details unrestorable file properties.

RestoreDetailsName

The name of the restore details to retrieve.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ManagedDatabaseRestoreDetailsBackupSetProperties

The managed database's restore details backup set properties.

Name Type Description
backupSizeMB

integer (int32)

Backup size.

firstStripeName

string

First stripe name.

numberOfStripes

integer (int32)

Number of stripes.

restoreFinishedTimestampUtc

string (date-time)

Last restored file time.

restoreStartedTimestampUtc

string (date-time)

Last restored file time.

status

string

Backup set status.

ManagedDatabaseRestoreDetailsResult

A managed database restore details.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.blockReason

string

The reason why restore is in Blocked state.

properties.currentBackupType

string

Current backup type.

properties.currentRestorePlanSizeMB

integer (int32)

Current restore plan size MB.

properties.currentRestoredSizeMB

integer (int32)

Current restored size MB.

properties.currentRestoringFileName

string

Current restoring file name.

properties.diffBackupSets

ManagedDatabaseRestoreDetailsBackupSetProperties[]

Diff backup sets.

properties.fullBackupSets

ManagedDatabaseRestoreDetailsBackupSetProperties[]

Full backup sets.

properties.lastRestoredFileName

string

Last restored file name.

properties.lastRestoredFileTime

string (date-time)

Last restored file time.

properties.lastUploadedFileName

string

Last uploaded file name.

properties.lastUploadedFileTime

string (date-time)

Last uploaded file time.

properties.logBackupSets

ManagedDatabaseRestoreDetailsBackupSetProperties[]

Log backup sets.

properties.numberOfFilesDetected

integer (int32)

Number of files detected.

properties.numberOfFilesQueued

integer (int32)

Number of files queued.

properties.numberOfFilesRestored

integer (int32)

Number of files restored.

properties.numberOfFilesRestoring

integer (int32)

Number of files restoring.

properties.numberOfFilesSkipped

integer (int32)

Number of files skipped.

properties.numberOfFilesUnrestorable

integer (int32)

Number of files unrestorable.

properties.percentCompleted

integer (int32)

Percent completed.

properties.status

string

Restore status.

properties.type

string

Restore type.

properties.unrestorableFiles

ManagedDatabaseRestoreDetailsUnrestorableFileProperties[]

Unrestorable files.

type

string

Resource type.

ManagedDatabaseRestoreDetailsUnrestorableFileProperties

The managed database's restore details unrestorable file properties.

Name Type Description
name

string

File name.

RestoreDetailsName

The name of the restore details to retrieve.

Value Description
Default