Fatal error whilst backing up to SFTP using 2.0.6.3_beta_2021-06-17

Hello
I’m new to Duplicati and trying to use it to backup via SFTP. I have one backup that works but the other pc backup fails with a fatal error that I cannot understand. It appears to backup about 80% ok then fails. I’m doing a full C: drive backup excluding the OneDrive file folder and system and temp files.
I’m using windows10 and version 2.0.6.3_beta_2021-06-17
Any help would be appreciated.

The log for the error is as follows:- #####################
{“ClassName”:“Renci.SshNet.Common.SshException”,“Message”:“Failure”,“Data”:null,“InnerException”:null,“HelpURL”:null,“StackTraceString”:" at Renci.SshNet.Sftp.SftpSession.RequestOpen(String path, Flags flags, Boolean nullOnError)\r\n at Renci.SshNet.SftpClient.InternalUploadFile(Stream input, String path, Flags flags, SftpUploadAsyncResult asyncResult, Action1 uploadCallback)\r\n at Duplicati.Library.Backend.SSHv2.PutAsync(String remotename, Stream stream, CancellationToken cancelToken)\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<DoPut>d__24.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<>c__DisplayClass20_0.<<UploadFileAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<DoWithRetry>d__21.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<DoWithRetry>d__21.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<UploadFileAsync>d__20.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<UploadBlockAndIndexAsync>d__18.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Duplicati.Library.Main.Operation.Backup.BackendUploader.<<Run>b__13_0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at CoCoL.AutomationExtensions.<RunTask>d__101.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Duplicati.Library.Main.Operation.BackupHandler.d__19.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nRequestOpen\nRenci.SshNet, Version=2020.0.1.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106\nRenci.SshNet.Sftp.SftpSession\nByte RequestOpen(System.String, Renci.SshNet.Sftp.Flags, Boolean)”,“HResult”:-2146233088,“Source”:“Renci.SshNet”,“WatsonBuckets”:null}

Welcome to the forum @riponian

Next backup should pick up where failed one left off, so consistent 80% is surprising.

Is this a new backup, an update to existing one, etc.? Does it finish if backup is less?
If it ever finishes, check your job log, Complete log to see if RetryAttempts is zero.
If non-zero, you had some failed transfers, so might be exhausting number-of-retries.

Is the SFTP server near on a local area network or across the Internet (less reliable)?

What SFTP server? Does it have logging? Even if not, are files going up until it stops?

What OS is Duplicati running on?

Thanks for responding. I have reduced the amount of data to be backed up and the task does indeed finish satisfactorily. It is being backed up to a remote server over the internet. I haven’t backed up the drive with the OS on yet and I suspect it is failing while processing a file on there. If it does I’ll post the exact details.

Is it doing retries? You don’t see those creep in until it fails (or you look at the log, which I what I’m asking), but if the Internet is a little unreliable, more retries might help. You can also increase retry-delay, if you like.

You’re no longer backing up C: drive but suspect a file on C: breaks SFTP? If so, definitely post the details.

I’m afraid I have now lost the log of the failing backup but all the other backups I’m doing to that server show “retries = 0”
I will try to recreate the backup definition that caused the problem now I have enough data being backed up safely.
Phil.

Thank you. Being able to recreate problems reliably helps hugely to tracking down what’s behind them.

I’m afraid I cannot reproduce the exact error I had before and I deleted the backup definition for that one to stop it retrying.
However the same specification failed with id=8 no transaction active.

Additionally it seems I can no longer do anything because nearly all the options I take give the error “The database has version 11 but the largest supported version is 10.” It says this is most likely because I updated the database and then reverted to a prior version, which I have not done, not even sure what database it’s referring to. Nothing has been changed recently on this pc.

Logs attached

Phil

(Attachment duplicati errors.txt is missing)

If that’s exactly what you tried to attach, didn’t it pop up an error? Regardless, try a .zip file version.

In this case (but not always) the database for the backup job as described in Database management.

Release: 2.0.6.1 (beta) 2021-05-03 talks about it a bit, mentioning 11 and 10, and giving a downgrade procedure for intentional downgrade if desired. Yours was probably accidental changes to the 2.0.6.3 update which you can find and then right-click → Properties to see if it contains 701 Files, 90 Folders.

Try looking for the 2.0.6.3 folder in C:\ProgramData\Duplicati\updates and
C:\Users\<Duplicati user account>\AppData\Local\Duplicati\updates

Please mention any other updates that you see, and also About → System info → BaseVersionName which is what runs initially, then runs the latest intact update. Here, the latest 2.0.6.3 may be damaged which might leave you on an older version such as 2.0.5.1 which doesn’t know the 2.0.6.x DB formats.

Duplicati forgets update was a case where some extra folders and files got made, but it’s unclear how.

I can see the 2.0.6.3 folder and no others. It contains the right number of files and folders.

I can no longer restore files from the successful backups as I get the database version error on everything i try. Now uninstalled it

Phil

If you reinstall from .msi of 2.0.6.3, that should make the base version 2.0.6.3, so should work with DB.

Are you running Duplicati as a Windows Service? You’d have had to run Duplicati.WindowsService.exe

That was the first test. Duplicati checks file contents too. You can now see if any files have newer dates.
There is a procedure for a more thorough check in the topic I cited earlier, or see the bottom of this post.

Did you confirm that BaseVersionName is 2.0.5.1? You can still go back to that with an .msi install, if you would be willing to look at the problem further. For example you can move the old 2.0.6.3 update to some other folder, try another update from 2.0.5.1 (you might need to start Duplicati to actually get it activated)., then see if About on home screen says 2.0.6.3. About → System info ServerVersionName will also say.

If it got to 2.0.6.3 then the question is how is this 2.0.6.3 update different from the other. You can compare folders carefully or even swap them around by hand. If one works and one doesn’t then find the difference.

Hi
Normally I would be happy to investigate but I’m just about to go away for a month and I don’t have time at the moment. I need a reliable backup before I leave.

Phil

Just installing 2.0.6.3 from .msi is the fastest/safest path for now. File checking is only done on updates.

EDIT: although after you get on 2.0.6.3 I suppose the SFTP error could reoccur. I suppose we’ll find out…