I have a unraid server setup with Duplicati backing up to B2. I am trying to backup about 280GB and each weekend I have started the backup and then left it till the Monday. When I check on the Monday its stopped with an error “2022-03-07 07:54:35 +02 - [Warning-Duplicati.Library.Main.Operation.BackupHandler-CancellationRequested]: Cancellation was requested by user.” which seems to imply that me the user has cancelled it. However this is obviously not the case.
Do any of you know of this happening? Is there some obvious problem here that I am missing.
My duplicati is password protected so it wont be anyone else having access to it, all I can think of is that the error isn’t actually 100% accurate and its something else canceling it.
I’m less confident in my guess now. I tried simulating the cancellation message by throwing an exception in the above code block but it didn’t work. (Well, the job stopped but it didn’t say it was due to user requested cancellation.)
So now I’m back to not seeing how you’d get that message without someone pushing the Stop button in the web UI (or making the equivalent REST API call).
There might be another hint in the log before it or from one of the other logs or with more logging enabled or whatever. At least hopefully though not supplied.
I could also be mistaken. But it does look like Controller ultimately calls BackupHandler where the message is. And controller may set variable when calling Stop(). That call gets used in multiple looking possibly not requiring user places. Which those places also get called from yet other places. I’m not looking into that any further.
Maybe I’m looking at it incorrectly with github’s search function. It does look like it can definitely be set project wide from anywhere with access.
This is the first report Google can find of “Cancellation was requested by user” in forum or Issues.
So it’s a mystery… Thanks to @Xavron for saying logging would help, and other technical ideas.
Does the backup not even get started, or does it put up files (check B2) for awhile then stop that?
Sometimes there are also things that happen before a backup itself, such as cleaning up last one.
This is especially likely if last one didn’t finish, and sometimes depends on Advanced option setup.
Can you say (without giving paths, etc.) any special settings you have put on the Options screen?
The live log mentioned is often helpful. For longer logs, you’d use log file related advanced options.
Xavron seems to still be looking through code, so thanks for that because it’s probably needed too.
If its coming from Stop() there as I noted then with github I’m having trouble figuring it out further. It gets all weird from there. Some stuff only jumps well from an IDE or whatever. Github still has some things to work on there.
A couple of months and weeks ago I had a very similar problem when some long running backup jobs stopped without any obvious reason. But at last I found the solution:
I’m running duplicati on linux, and its temporary files are stored in $TMPDIR which defaults to /tmp. And /tmp is a tmpfs filesystem which is not part of the usual swap space. So I just changed $TMPDIR to a different location (which is not in the source files area of duplicati, of course). Since this change not a single duplicati job had this problem any longer.
So if your duplicati job is running on linux too, you could just check your system logs if there were some OOM killer (Out Of Memory) messages.
My memory could be fading but quite sure /tmp can also run out of space and can be increased. Had a problem I’m quite sure there with Duplicati on Linux as well (or at least after installing enough software that used it).
But, I will refrain from talking about Duplicati and Linux any further… zip. I destroyed the key lol.
The backup does start and got about 25GB in before it stopped.
However I have managed to get it to run successfully once now, I set a bunch of advanced options to try and limit how fast it was going and how much strain it put on the server and it actually managed to finish now. Took about 6 Days but I dont mind as long as it finished. Ill post a screenshot of the advanced options now.