NinjaOne Backup — Error 150: Backup Database Error
Audience: T2 Use when: Backup fails with "Error 150: Database Error."
What This Error Means
Lockhart maintains an internal SQLite database that tracks backup metadata — revision history, block checksums, file indexes, and job state. Error 150 means this internal database has become corrupt or is in an inconsistent state that Lockhart cannot recover from automatically.
This is not the dental practice's database. It's Lockhart's own internal tracking database.
Why It Happens
| Cause | Explanation |
|---|---|
| Abrupt termination during a write | Power loss, forced reboot, or crash while Lockhart was updating its metadata DB |
| Disk I/O error on the metadata write | Bad sector affecting the Lockhart data path |
| Storage full when Lockhart tried to write metadata | No space for the database write to complete |
| Filesystem corruption on C: | The ProgramData directory where Lockhart stores its database is corrupt |
Step 1 — Confirm the Error
In the NinjaOne activity log, Error 150 should appear with a message indicating a database error. Confirm this in the Lockhart log:
$logPath = "C:\ProgramData\NinjaRMM\NinjaOneBackup\logs\lockhart.log"
Get-Content $logPath | Where-Object {$_ -match "database|150|DB error"} | Select-Object -Last 20
Step 2 — Check Disk Health on C:
The Lockhart database lives in C:\ProgramData\NinjaRMM\NinjaOneBackup\. Disk errors on C: can corrupt it:
Get-PhysicalDisk | Select FriendlyName, HealthStatus
Get-WinEvent -LogName System -MaxEvents 200 |
Where-Object {$_.Id -in @(7, 11, 51)} |
Select TimeCreated, Id, Message | Format-List
If disk errors are present: address those first — the database corruption is a symptom.
Step 3 — Restart Lockhart and Retry
A controlled restart sometimes allows Lockhart to rebuild its database state from the NAS repository:
Stop-Service -DisplayName "Lockhart" -Force
Start-Sleep -Seconds 10
Start-Service -DisplayName "Lockhart"
Get-Service | Where-Object {$_.DisplayName -like "*Lockhart*"} | Select Status
Then trigger a manual backup run and monitor the activity log.
Step 4 — If Retry Fails — Escalate to NinjaOne Support
Error 150 is one of the errors where DTC's self-service options are limited. NinjaOne support can:
- Inspect the Lockhart database state remotely
- Instruct on safely clearing the corrupt metadata database
- Force a database rebuild from the existing NAS repository
Collect before calling:
# Zip all Lockhart logs and the data directory contents (not the actual backup data — just metadata)
$logPath = "C:\ProgramData\NinjaRMM\NinjaOneBackup\logs"
Compress-Archive -Path "$logPath\*" -DestinationPath "C:\Temp\NinjaBackupLogs_150_$(Get-Date -Format 'yyyyMMdd').zip" -Force
Write-Host "Ready for NinjaOne support: C:\Temp\NinjaBackupLogs_150_$(Get-Date -Format 'yyyyMMdd').zip"
What NOT to Do
- Do not manually delete files in
C:\ProgramData\NinjaRMM\NinjaOneBackup\without NinjaOne support guidance — this can permanently orphan the backup repository - Do not attempt to repair the SQLite database manually — this requires NinjaOne's tooling