Restoration of large backup got stuck, "database file is locked" error

Hi everyone!

I used Duplicati to backup my user data from my MacBook to Google Drive before resetting the machine and going back to a clean install. Backup worked very smoothly, but I am having some issues with restoring the data.

The size of the stored data is quite large, 200ish GB. After the first full backup I had done another one because I had added a few files. That backup could not be restored for some reason, so I went with the first one instead. I let the process run over night, only to find it stuck at 72 GB left in the morning.

I have paused the process and restarted the machine and Duplicati. I had to kill the Duplicati process several times because the browser window wouldn’t show up at first when launching the app from the Mac’s Launchpad. There was no indication of a paused process as far as I remember, so I figured the process might have been successful and the progress bar might just have been stuck.

I wanted to make sure the data has been restored in its entirety and re-ran the restoration. When I did that, I got the “The database file is locked database is locked” error. I did some research and figured it might have to do with the Duplicati data folder being part of the user home directory which I am restoring to. I tried to expand the file tree in the restore step to exclude it, but that would kill the process.

Now I managed to rerun the restoration and it’s stuck at 72 GB left again, no progress in the last 30 minutes.

Help is highly appreciated.


I think that you may have trouble with operating system sleep. Try to disable it entirely (no idea about how to do that with a Mac, sorry).
Also about restoring, maybe it’s good to remind you that you are not supposed to backup the Duplicati database, you are supposed to recreate it from the backend when restoring to a new system (don’t apply when you are using Duplicati to restore a few files with a running backup, of course).
So you should exclude Duplicati data files from backup. This is not helping when you have failed to do so and there are Duplicati data files in the backup, it could explain the ‘locked’ message - it’s possible to exclude files from restore but only from the command line, not from the UI.
As a workaround, you can restore to an alternate path and copy back the files after a successful restore.