Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Backup for Cosmos DB enables you to take backups of your data and store them in an Azure Backup Vault for extended retention periods. It works alongside continuous backup (point-in-time restore) and allows you to protect your data for compliance, auditing, or disaster recovery scenarios that require retention beyond the standard continuous backup window.
Prerequisites
For more information about the supported regions, scenarios, and limitations, see Azure Cosmos DB backup support.
Troubleshoot common errors
When you work with Azure Backup for Cosmos DB, the service validates your requests against several prerequisites. If a validation check fails, the service returns a 4xx response with an error code that identifies the specific issue.
The following table lists the common errors you might encounter, grouped by which operations they apply to.
Operations legend: E = Enablement, D = Disablement, B = Backup, R = Restore
| Error code | Applies to | Description | Resolution |
|---|---|---|---|
RequestNotSupportedOnOfflineCosmosDBAccountUserError |
E, B, R | The Azure Cosmos DB account isn't in the Online state. The account might be in a transitional state such as deleting or disabled. | Wait for the account to return to the Online state before retrying. |
AccountIsSoftDeleted |
B | The source account is soft deleted and can't accept a new backup request. | Recover the account from soft deletion and wait for it to return to the Online state before retrying. |
LongTermProtectionNotEnabledUserError |
B | Long-term protection (LTP) hasn't been enabled on this account. Backup operations require LTP to be enabled. | Contact Azure Support to enable long-term protection on your account. |
CrossRegionExternalBackupNotAllowedUserError |
B | The Azure Cosmos DB account's write region doesn't match the account's ARM location and cross-region backups aren't enabled for this account. This issue can occur if the write region was changed after the account was originally created. | Ensure the Azure Cosmos DB write region matches the ARM location before retrying. |
CrossRegionLongTermProtectionNotAllowedUserError |
E | The account's ARM location doesn't match its write region. LTP can only be enabled when these match. | Ensure the account's write region matches the ARM location before enabling LTP. |
RequestNotSupportedOnEmptyCosmosDBAccountUserError |
B | No databases or collections were found in the account at the specified backup timestamp. | Verify that your account contains at least one database and collection before retrying. |
PartitionLimitExceededUserError |
E, B | Your account exceeds the partition limit for LTP enablement or backup. | Contact Azure Support for assistance. |
IncorrectApiTypeForCosmosDBAccountUserError |
E, R | For enablement: LTP is only supported on NoSQL and MongoDB API accounts. For restore: the target account's API type doesn't match the backup source. | For enablement, use a NoSQL or MongoDB account. For restore, ensure the target account uses the same API type as the source. |
RequestNotSupportedOnPeriodicBackupModeCosmosDBAccountUserError |
E | The account uses periodic backup mode. LTP requires continuous backup (PITR) to be enabled. | Migrate the account to continuous backup mode (PITR) before enabling LTP. |
RequestNotSupportedOnPPAFEnabledCosmosDBAccountUserError |
E | The account has per-partition automatic failover (PPAF) enabled, which isn't compatible with LTP on this account. | Disable per-partition automatic failover before enabling LTP. |
RequestNotSupportedOnNspEnabledCosmosDBAccountUserError |
E | The account has a network security perimeter (NSP) association, and the account doesn't support combining NSP with LTP. | Review your network security requirements before removing the NSP association, or contact Azure Support to discuss supported options. |
WriteRegionChangedSinceLastBackupUserError |
B | An incremental backup can't continue because the write region was added, changed, or brought back online after the previous backup. | Take a new full backup to start a new backup chain before resuming incremental backups. |
BackupTooOldForIncrementalBackupUserError |
B | The previous backup is older than the maximum age allowed for an incremental backup. The error message specifies the age limit. | Take a new full backup to start a new backup chain, then ensure subsequent backups complete within the allowed interval. |
AnotherBackupInProgressOnCosmosDBAccountUserError |
B | Another external backup is already in progress on the account. | Wait for the current backup to complete before retrying. |
RequestNotSupportedOnMultiRegionCosmosDBAccountUserError |
R | The target account has multiple regions. Restore is only supported on single-region accounts. | Remove additional regions from the target account before retrying. |
RequestNotSupportedOnNonEmptyCosmosDBAccountUserError |
R | The target account already contains databases. Restore requires an empty account. | Delete all databases from the target account before retrying, or create a new account with no data in it. |
InvalidRestoreScopeUserError |
R | A database or collection in the requested restore scope isn't present in the selected backup. | Select databases and collections that exist in the recovery point, or choose a recovery point that contains the requested resources. |
AccountThroughputLimitExceededUserError |
R | Creating a restored collection would exceed the target account's total throughput limit. | Increase the target account's total throughput limit to accommodate the restored collections, then retry the restore. |
AnotherOperationInProgressOnCosmosDBAccountUserError |
R | Another management operation is already in progress on this account. | Wait for the current operation to complete before retrying the restore. |
PreconditionFailed |
E, D | Another operation is in progress on the account and prevents LTP enablement or disablement from proceeding. | Wait for the other account operation to complete, then retry. |
Tip
If you continue to experience issues after following the recommended resolution steps, contact
Azure Support with the full error response, including the error code and the x-ms-request-id
header.