Error message: Request for http://localhost:8200/api/v1/backup/1/log?pagesize=100 gave error

Another day, another backup, another error message …

Details reported for this one are:
System.Data.SQLite.SQLiteException (0x80004005): database is locked database is locked at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain) at System.Data.SQLite.SQLiteCommand.BuildNextCommand() at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at Duplicati.Server.WebServer.RESTMethods.LogData.DumpTable(IDbCommand cmd, String tablename, String pagingfield, String offset_str, String pagesize_str) at Duplicati.Server.WebServer.RESTMethods.Backup.FetchLogData(IBackup backup, RequestInfo info) at Duplicati.Server.WebServer.RESTHandler.DoProcess(RequestInfo info, String method, String module, String key)

Meaningless to me, and worrying

What was Duplicati doing when it showed this error message?

All I can say now is that it was running a scheduled backup.
I will try to make notes at the time if reporting any such thing again.

(I have hundreds of error messages (>1300 generated today alone by the look of it) and have scrolled back to those generated on 18th Jan but all are just listed as Date- Time - Message and I cannot open every one now to see what it is. I sampled some as I went back through the days’ output, and all I looked were telling me about files the program could not access. It would be very useful to have an easy way to click something to add that to the list of files to be ignored next run. If I remember rightly, there was something like that in the earlier version of Duplicati. This would be a great help to people like me who do not know enough to flag all the right folders and files to be ignored by the backup routine.)

If the errors are ALL “database is locked” then there might be multiple copies of Duplicati running and trying to access the same database.

If the errors are NOT all “database is locked” then you may be running into permission issues (files might belong to another user) or file locking issues (files in use by another app, such as browser temp files).

On what OS are you running Duplicati and is it as the Tray Icon or the service?

There is no other user, but, yes, I believe locked files were the source of many of the error messages.

I have not seen “database locked” for quite a while now.

Errors seen Jan 20th-22nd appear to be mainly of the sort
"Failed to process metadata for "C:\ProgramData\Microsoft\ …"
and
"Error reported while accessing file: C:\Program Files\WindowsApps
System.UnauthorizedAccessException: Access to the path ‘C:\Program Files\WindowsApps’ is denied.“
and
"Failed to process path: C:\ProgramData\AVAST Software\Avast\IDS\profile\globalLoadable.dat
System.UnauthorizedAccessException: Access to the path ‘C:\ProgramData\AVAST Software\Avast\IDS\profile\globalLoadable.dat’ is denied.”

It was those, where Duplicati was apparently trying to access software that was running in the background, such as the operating system and antivirus, that made me want to alter the options and tell it not to attempt to look at those.
It was after I attempted that operation that I got the “The remote server returned an error: (401) Unauthorized.” message.

Duplicati reports that the last successful backup was on Monday of this week.Yesterday’s (23rd Jan) gave me "The remote server returned an error: (401) Unauthorized."
I just tried it again now; it goes through “verifying backend data” then gives me the 401 message.

Windows 10 and as a tray icon.

OK, then it sound like the issue is mostly “in-use” files (hence the “denied” message).

While you could manually exclude those files (something I used to do with CrashPlan a lot - it works, but takes some time to catch them all) probably the easiest way to get around that is to use the --snapshot-policy parameter to tell Duplicati to use a VSS snapshot.

If your user has snapshot permissions, then that should do the trick. If it doesn’t, then you either need to give yourself those permissions or try running Duplicati as a service with snapshot permissions. (Side benefit, backups will run even if you’re not logged on.)