The database file is locked after stopping backup job


#1

I reference another topic here as well, because this one resulted in the above issue :smiley:

After stop after upload didn’t work but I needed to stop the backup, I used stop and moved the data which was locally to a remote location where all the other data is located as well.
The other backup jobs work great, but this one makes headaches.

600GB of 1,4TB were transfered and now if I start the job I get

The database file is locked database is locked

I need to fix this without losing the backup data, it took me already quite long to create the 600GB archives.


Error on purge-broken-files
Stop after Upload
#2

In the other post you mention QNAP, so I assume this is still the case.

To check why the database is locked, you need to first get the database path.
You can get it a number of ways, one is to use “Export” then “As commandline” on the backup job, and look for --dbpath=.

Then you need to use lsof <dbpath> from a commandline or similar. This will tell you which processes are locking the file. To recover, you should be able to restart the programs locking the database, and then Duplicati should get access again.

Quick and dirty fix, is to reboot the system, hereby restarting all processes.


#3

Great, I got a step further :slight_smile:
I can now rerun the backup job, but instead of the database locked error I get

Error while running name
One or more errors occured.

The log data shows a list with lots of entries (5136 to be precise)
Which all look similar to

{“Name”:“duplicati-ifd2fcc476abe489a8b44868f93373175.dindex.zip.aes”,“LastAccess”:“2018-06-01T19:00:25+02:00”,“LastModification”:“2018-06-01T19:00:25+02:00”,“Size”:34877,“IsFolder”:false}

I just don’t understand where the error is.