| Previous | Next |
| hrNoBackupDirectory | hrBackupInProgress |
hrBackupDirectoryNotEmpty
Interpretation in the backup state machine
hrBackupDirectoryNotEmpty means the selected backup destination contains artifacts that would make the new set ambiguous.
The stored value is 0xC80001F8 (negative JET error -504; -504). Current ESE documentation uses JET_errBackupDirectoryNotEmpty for the corresponding published JET condition.
The first useful distinction is that the guard protects set isolation; deleting files blindly can destroy the only usable backup. Start by inventorying filenames, generations, database signatures, ownership, and whether a prior aborted backup left temporary files.
Start with these observations
- Code-specific observation: inventory filenames, generations, database signatures, ownership, and whether a prior aborted backup left temporary files.
Objects and state involved
| Diagnostic layer | the ESE external-backup state machine and its single active session |
|---|---|
| Relevant API surface | JetBeginExternalBackup, JetGetAttachInfo, JetOpenFile/ReadFile/CloseFile, JetGetLogInfo, and JetEndExternalBackup |
| Code-specific condition | the selected backup destination contains artifacts that would make the new set ambiguous |
| Narrow corrective direction | move existing artifacts to quarantine or choose a clean destination, then start a new backup context |
Database files are enumerated and copied before the backup advances to the log-file phase. The engine tracks outstanding backup file handles and rejects calls made in the wrong phase.
Recovery or retry plan
- Record it,
0xC80001F8, the API name, the current phase, and all live context or file owners. - Verify the condition by taking an inventory of filenames, generations, database signatures, ownership, and whether a prior aborted backup left temporary files.
- Apply only the targeted fix: move existing artifacts to quarantine or choose a clean destination, then start a new backup context.
Not the same as
It specifically means that the guard protects set isolation; deleting files blindly can destroy the only usable backup. Related values below can appear in the same workflow but require a different response:
hrNoBackupDirectory | the external-backup operation has no destination directory configured for its temporary or copied artifacts |
|---|---|
hrInvalidBackupSequence | backup APIs were called in an order that violates the ESE external-backup state machine |
hrNoBackup | a backup-only API was called when no external backup session is active |
Actions that can make diagnosis worse
- Do not omit the final end/abort path.
- Do not continue using a context after a sequence failure.
Acceptance criteria for a fix
A useful regression test should force the condition “the selected backup destination contains artifacts that would make the new set ambiguous”, call one documented API transition, and assert the exact HRESULT.
Technical references
- Begin external backup — API ordering, file semantics, warning/error interpretation, or recovery behavior relevant to this HRESULT.
- Enumerating backup logs
- End external backup
- Microsoft JET_ERR enumeration
Looking for a different code? Search another status or error code.