Database disk image is malformed database disk image is malformed

I am using " Duplicati 2.0.4.5_beta_2018-11-28" on Windows 10 64 bit.

When running backup I am getting message “database disk image is malformed database disk image is malformed” and no new log entry is made.

Latest log from successful backup:

DeletedFiles: 0
DeletedFolders: 0
ModifiedFiles: 2
ExaminedFiles: 17733
OpenedFiles: 5
AddedFiles: 3
SizeOfModifiedFiles: 12523601
SizeOfAddedFiles: 731865
SizeOfExaminedFiles: 61078955567
SizeOfOpenedFiles: 13255466
NotProcessedFiles: 0
AddedFolders: 2
TooLargeFiles: 0
FilesWithError: 0
ModifiedFolders: 0
ModifiedSymlinks: 0
AddedSymlinks: 0
DeletedSymlinks: 0
PartialBackup: False
Dryrun: False
MainOperation: Backup
CompactResults: null
DeleteResults: null
RepairResults: null
TestResults:
    MainOperation: Test
    Verifications: [
        Key: duplicati-20191122T150833Z.dlist.zip.aes
        Value: [],
        Key: duplicati-i39c70c66433a4ca38f256f7d267c24d2.dindex.zip.aes
        Value: [],
        Key: duplicati-b3d397abd7e9545c194e31dc5d1442530.dblock.zip.aes
        Value: []
    ]
    ParsedResult: Success
    Version: 2.0.4.5 (2.0.4.5_beta_2018-11-28)
    EndTime: 11/22/2019 9:11:21 AM (1574435481)
    BeginTime: 11/22/2019 9:11:13 AM (1574435473)
    Duration: 00:00:07.5376907
    Messages: [
        2019-11-22 09:08:33 -06 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started,
        2019-11-22 09:10:40 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  (),
        2019-11-22 09:10:43 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (3.05 KB),
        2019-11-22 09:10:51 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-b63254fe1d5504487884a1ee1b91d9888.dblock.zip.aes (11.98 MB),
        2019-11-22 09:11:03 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-b63254fe1d5504487884a1ee1b91d9888.dblock.zip.aes (11.98 MB),
...
    ]
    Warnings: []
    Errors: []
    BackendStatistics:
        RemoteCalls: 8
        BytesUploaded: 14586935
        BytesDownloaded: 54447383
        FilesUploaded: 3
        FilesDownloaded: 3
        FilesDeleted: 0
        FoldersCreated: 0
        RetryAttempts: 0
        UnknownFileSize: 0
        UnknownFileCount: 0
        KnownFileCount: 3130
        KnownFileSize: 56708287730
        LastBackupDate: 11/22/2019 9:08:33 AM (1574435313)
        BackupListCount: 702
        TotalQuotaSpace: 0
        FreeQuotaSpace: 0
        AssignedQuotaSpace: -1
        ReportedQuotaError: False
        ReportedQuotaWarning: False
        ParsedResult: Success
        Version: 2.0.4.5 (2.0.4.5_beta_2018-11-28)
        Messages: [
            2019-11-22 09:08:33 -06 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started,
            2019-11-22 09:10:40 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  (),
            2019-11-22 09:10:43 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (3.05 KB),
            2019-11-22 09:10:51 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-b63254fe1d5504487884a1ee1b91d9888.dblock.zip.aes (11.98 MB),
            2019-11-22 09:11:03 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-b63254fe1d5504487884a1ee1b91d9888.dblock.zip.aes (11.98 MB),
...
        ]
        Warnings: []
        Errors: []
ParsedResult: Success
Version: 2.0.4.5 (2.0.4.5_beta_2018-11-28)
EndTime: 11/22/2019 9:11:21 AM (1574435481)
BeginTime: 11/22/2019 9:08:33 AM (1574435313)
Duration: 00:02:47.6878349
Messages: [
    2019-11-22 09:08:33 -06 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started,
    2019-11-22 09:10:40 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started:  (),
    2019-11-22 09:10:43 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed:  (3.05 KB),
    2019-11-22 09:10:51 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-b63254fe1d5504487884a1ee1b91d9888.dblock.zip.aes (11.98 MB),
    2019-11-22 09:11:03 -06 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-b63254fe1d5504487884a1ee1b91d9888.dblock.zip.aes (11.98 MB),
...
]
Warnings: []
Errors: []

Question: How can I fix it?

Sounds like there may be an issue with your local database. I might suggest you try renaming the sqlite file (do not delete, just in case) and doing a repair. You can see where the job-specific sqlite file is located and what it is named by going to the main Duplicati UI, clicking the job, and then clicking the Database link. After you rename the file, go to this same screen and click Repair.

A word of caution - the version you are running has a bug that MAY cause the database recreation phase to download all dblock files and take a very long time. If your backup is large, the issue can be even more pronounced, especially if your backup data is remote. This bug has been fixed in the latest Canary versions but hasn’t yet made it to the Beta channel.

You could try database rename and repair with the 2.0.4.5 version you are currently running. You may not have the circumstances that trigger the long database recreation bug. If database recreation takes too long (say, over 8 hours) you could cancel the procedure, install the latest Canary version, and try recreation again.

Normally I would not advise using Canary in a production environment, but the latest Canary is very stable and is getting close to being promoted to experimental or beta. If you do opt to try the latest Canary, I would switch back to the beta channel once the next beta is released.

I added other files locally and after rerun the update and the error disappeared and everything ended without any error or warning.

  1. Should I be worried?

  2. Maybe there is any additional tests or repair that are triggered on local change of data but not triggered if local data equals to remote data? Also here: Warnings like: "Duplicate path detected" the issue was fixed either after I added data to local data OR folder contained space character on the end and removing it fixed the issue. Maybe @kenkendk can answer this?

Testing restore occasionally should be standard procedure, and even more so after odd issues happen.
Do you ever run restore tests, preferably with –no-local-blocks or direct restore to a different computer?

This error is (11) SQLITE_CORRUPT which seems very vague but is supposedly something in 6.0 How To Corrupt Your Database Files. Anything relevant? Any Windows or Duplicati restart in fail or recovery?

Testing restore occasionally should be standard procedure, and even more so after odd issues happen.

You mean this? Or you recommend other way?

Do you ever run restore tests, preferably with –no-local-blocks or direct restore to a different computer?

I have restored through GUI restore function to different PC 6-7 months ago and it went without any errors or warnings and I think without data corruption.

This error is (11) SQLITE_CORRUPT which seems very vague but is supposedly something in 6.0 How To Corrupt Your Database Files. Anything relevant? Any Windows or Duplicati restart in fail or recovery?

Nothing similar. I had Windows “blue screen” (do not remember any details) 1 month ago, but nothing similar between last successful upload and before unsuccessful one. I made a successful upload (no errors, no warnings) and after (I do not remember if I changed anything in local data) I ran the upload second time (10 mins after first successful one) and it gave me error that I have mentioned in first post. After that I changed local data and upload went without any errors.

The Verify files operation is documented in Verifying backend files as being just the tiny sampling test that happens after each backup, so pushing the button adds little. You can increase the sampling:

backup-test-samples
The TEST command

but in any case this is mostly a test that remote files have the expected content, by downloading them.

There’s no substitute for testing a Restore, and how heavily and how often depends on how important your backup is to you. Maybe it’s not, maybe it’s a secondary, maybe it’s primary and super-important?

It’s up to you and depends on time available and maybe download costs or limits, but I recommended

Or if the backup doesn’t matter much, you can probably just keep going and see if any errors come up.

As a special test beyond the usual, a somewhat technical approach would be to install DB Browser for SQLite, shut down Duplicati, open a copy of your database and run SQL PRAGMA integrity_check

Database disk image is malformed gives an example of this test, but don’t go right off trying to repair it