Skip to main content

SQLite: The database disk image is malformed

This document provides a solution for the "The database disk image is malformed" error in CloudM Migrate. This error is specific to the SQLite databases used by the application and typically results from database corruption, often caused by an unexpected system shutdown while the application is writing to a file.

Note: This guide is intended for users of CloudM Migrate Self-Hosted. If you are using CloudM Migrate Hosted, please contact our Support team for assistance.


Cause

SQLite database corruption can occur due to an abrupt shutdown of the machine during a file write operation. While CloudM Migrate uses journaled writes, a feature of SQLite, to prevent this, corruption is still possible in some rare cases.


Solution: Initial Troubleshooting

To resolve this issue, you must delete the corrupted SQLite database files and re-run the migration.

  1. Stop all migrations: Ensure no migrations are currently running in the CloudM Migrate application.
  2. Locate the data cache directory:
    • See the below guide to finding the specific directories
      • EG. C:\ProgramData\Cloud Technology Solutions\174ac4f9-6dae-4887-886a-57d87a075223\dd071011-72d8-48d5-8019-7634170efdf0
  3. Delete affected files: In the Data directory, delete all files with the .db3 and .db3-journal extensions. These are the SQLite database and journal files.
  4. Retry migration: Relaunch your migration.

Solution: Further Troubleshooting

If the error persists after following the initial steps, proceed with the following actions:

  1. Delete additional cache files: Repeat the steps above but also delete the contents of the Static and Temp folders located within the same directory as the Data folder.
  2. Final troubleshooting step: If the error still persists, delete the contents of the Data, Static, Temp, and History folders.
    • Impact of deleting history: Deleting the contents of History (at the batch level) will remove the migration history for all items within the selected migration batch. See here for more information.

Finding The Directories

To find the data cache directory, go to C:\ProgramData\Cloud Technology Solutions on the primary server. 

  1. You will find a folder with a GUID (C:\ProgramData\Cloud Technology Solutions\174ac4f9-6dae-4887-886a-57d87a075223, for example). This is the Project GUID. Within that project folder, you will see similar folders, which are the Batch GUIDs which can be easily matched using the URL in the browser address bar

    C:\ProgramData\Cloud Technology Solutions
    CloudM Migrate - Cloud Technology Solutions Folder.png

    URL Batch ID location
    Migration in Progress - GUID.png

    Inside the Project GUID folder, find the Batch GUID
    Migration Traces Location - Primary Server.png
  • Here, you will find the DataStaticTemp, and History folders required for these troubleshooting steps.
    Migration Traces Location - Primary Server - Migration Traces.png
Was this article helpful?
0 out of 0 found this helpful