Database Image is Malformed

Situation

The following error appears: Database image is malformed.

This means the error is related to the repository.

To optimize the number of requests to cloud storage accounts and other purposes, Backup for Windows (or Backup Agent for Windows) runs the internal database called repository.

To learn more about the repository, refer to the Repository Explained article. The repository is built on SQLite technology

The Database image is malformed error appears to be among the most common errors for SQLite users.

The error occurrence means that the repository database was corrupted and a cause is not obvious. It may happen due to several reasons:

  • Increased use of SQLite database that results in the significant growth of data
  • Hardware failure or flash memory failure
  • Some minor issues.

Solution

This issue can be resolved by creating a new repository database.

To Create a New Repository, proceed as follows:

  1. Run Backup for Windows (Backup Agent for Windows).
  2. Make sure no backup or restore plans are currently running.
  3. In the left bottom corner, right-click Backup Service, then select Stop Service.

If you have sufficient privileges, stop the RM Service

  1. Exit Backup for Windows (Backup Agent for Windows).
  2. Navigate to the database location. The default location is:
  • In Backup for Windows: C:\ProgramData\CloudBerryLab\CloudBerry Backup\Data
  • In Backup Agent for Windows: C:\ProgramData\Online Backup\data

In case the repository location is a custom one, in the Tools menu, click Diagnostic, then in the Diagnostic property box, click Open in Folder. The folder with logs is opened. Navigate one level upper and find the data folder. It must contain the cbbackup.db file

  1. Right-click the cbbackup.db file, then select Rename.

  1. Rename the repository file to any name different from the original name.
  2. Run Backup for Windows (Backup Agent for Windows) again. The repository synchronization will start automatically.

In case you have some data in the long-term storage, the repository synchronization must be run manually

To do this, in the Tools menu, select Options, switch to the Repository tab, then click Synchronize Repository. Be aware that synchronization may take several hours

You can view the synchronization progress on the Welcome tab under the Storage Accounts section. Once synchronization is complete, you can see backed up data on the Backup Storage tab and continue working with the backup plans

  1. Once the repository synchronization is finished, start the Backup Service back manually: in the left bottom corner, right-click Backup Service, then select Start Service.