Article ID: kb10086Last Modified: 16-Aug-2024

Malformed Database (code 1046)

Situation

The backup plan finishes with the following error: Malformed database. Cannot read data from the database. The disk where the database is located may be damaged or database files are corrupted.

Cause

This error appears to be among the most common errors.

The error occurrence means that the repository database cannot be read and the 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
  • Other issues

The repository is an internal database in Backup for Windows (or Backup Agent for Windows) designed to optimize the number of requests to cloud storage and some other purposes

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

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 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

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.
https://git.cloudberrylab.com/egor.m/doc-help-kb.git