Duplicati won't start: "This is likely caused by upgrading to a newer version and then downgrading"

In the crash log, it says:

“This is likely caused by upgrading to a newer version and then downgrading.”

How do I remedy this?

Welcome to the forum @Tim_Brown1

What OS? What Duplicati do you think you intended (e.g. current Beta, latest Canary, etc.)?

Presumably you had updated before. Anything special work just before the loss of updates?

If you wish, just reinstall Duplicati, but it would be nice to know how previous update got lost.

How do you start Duplicati? If you have a Windows service, the config is a bit more complex.

Had the same issue after accidantly installing the latest canary release.
Solution for Windows:

  1. reinstall canary
  2. export configuration
  3. remove canary
  4. delete C:\Users\<YourNameHer>\AppData\Local\Duplicati
  5. install release
  6. import configuration
  7. run repair

Maybe you can avoid the repair by just deleting C:\Users\<YourNameHer>\AppData\Local\Duplicati\Duplicati-server.sqlite

I wouldn’t have consider a downgrade but on canary the FTP connection to my local server was no longer working.

There is a local database connected to each backup, and this is the one to delete.
It is possible to downgrade it bit it requires running an SQL query on the database.

I am very interested in hearing what you experienced here? The next beta/stable release will use the current canary FTP backend, so more users will experience this if we do not fix it.

Can you share some details on what your setup is and what did not work?

Sure,

Source: Windows 11 Desktop with Duplicati Client 2.0.8.1 (2.0.9.111 canary by accident).
Destination: TrueNAS Scale 24.04.2.5
Connection: FTP, no SSL, username and password required, no advanced options
Error with canary release: Test connection returned “Folder does not exist” and folder creation, if selected, was not successful. Error code 550 was displayed.

If you need more, just let me know.

1 Like

Thanks for helping. I’d like to poke at the problem of this topic, where original post was vague.

If you had a start problem as opposed to a problem with a specific backup, that might be from

as opposed to

The error message should actually have given the numbers, which is another way to distinguish.

In your solution, the step 1 of reinstall canary got Duplicati starting, so what problems remained?

Generally Duplicati should be good at new versions updating old databases. Reverse won’t work.

How do you start and run Duplicati? That may impact the different possible issues that may arise.

Trying to install releases without stopping old release can be more fragile. Is this how you install?

In your solution, the step 1 of reinstall canary got Duplicati starting, so what problems remained?

With Canary I had the FTP problem mentioned before. Behavior was the same for first canary install and canary reinstall after attempted downgrade.

The error message should actually have given the numbers, which is another way to distinguish.

After downgrade, Duplicati crashed instantly without notification
These are the related Windows logs:

Application: Duplicati.GUI.TrayIcon.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception
   at Duplicati.Server.Program.GetDatabaseConnection(System.Collections.Generic.Dictionary`2<System.String,System.String>)
   at Duplicati.Server.Program.RealMain(System.String[])

Exception Info: System.Exception
   at Duplicati.GUI.TrayIcon.HostedInstanceKeeper..ctor(System.String[])
   at Duplicati.GUI.TrayIcon.Program.RealMain(System.String[])
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod(System.Reflection.MethodInfo, System.String[])
   at Duplicati.Library.AutoUpdater.UpdaterManager+<>c__DisplayClass58_0.<RunFromMostRecentSpawn>b__0()
   at Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater(Duplicati.Library.AutoUpdater.AutoUpdateStrategy, System.Action)
   at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn(System.Reflection.MethodInfo, System.String[], Duplicati.Library.AutoUpdater.AutoUpdateStrategy)
   at Duplicati.GUI.TrayIcon.Program.Main(System.String[])

Faulting application name: Duplicati.GUI.TrayIcon.exe, version: 2.0.8.1, time stamp: 0x663a135c
Faulting module name: KERNELBASE.dll, version: 10.0.26100.2161, time stamp: 0x31da495c
Exception code: 0xe0434352
Fault offset: 0x00000000000c831a
Faulting process id: 0x42EC
Faulting application start time: 0x1DB37728D8A103C
Faulting application path: C:\Program Files\Duplicati 2\Duplicati.GUI.TrayIcon.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 81ec4db2-5a3c-4d1d-8b4e-0ecf0e38da05
Faulting package full name: 
Faulting package-relative application ID: 

How do you start and run Duplicati?

Duplicati is automatically started after login to Win 11.

Trying to install releases without stopping old release can be more fragile. Is this how you install?

I wasn’t really paying attention to this but I would say the update procedure was:

  1. Duplicati showed a manual update in the UI, so I downloaded the MSI and started install.
  2. During installation the installer failed to automatically close the active duplicati instance.
  3. I think I then closed the active duplicati instance
  4. Clicked OK on the dialog window (restart may be required)
  5. Started Duplicati canary
  6. FTP not working, see other post
  7. There was a warning regarding deprecated FTP options, so I changed the configuration
  8. FTP still not working

It should notify to the terminal if run by hand. I don’t think it can make Windows do a popup, but

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 106 but the largest supported version is 6.

This is likely caused by upgrading to a newer version and then downgrading.
If this is the case, there is likely a backup file of the previous database version in the folder C:\Duplicati\duplicati-2.0.8.1_beta_2024-05-07\RUN.
   at Duplicati.Server.Program.GetDatabaseConnection(Dictionary`2 commandlineOptions)
   at Duplicati.Server.Program.RealMain(String[] _args) ---> System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 106 but the largest supported version is 6.

This is likely caused by upgrading to a newer version and then downgrading.
If this is the case, there is likely a backup file of the previous database version in the folder C:\Duplicati\duplicati-2.0.8.1_beta_2024-05-07\RUN.
   at Duplicati.Server.Program.GetDatabaseConnection(Dictionary`2 commandlineOptions)
   at Duplicati.Server.Program.RealMain(String[] _args)
   --- End of inner exception stack trace ---
   at Duplicati.GUI.TrayIcon.HostedInstanceKeeper..ctor(String[] args)
   at Duplicati.GUI.TrayIcon.Program.RealMain(String[] _args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod(MethodInfo method, String[] args)

(106 is just a large number that I hand-placed into the Version table Version column to error)

is written into updates\Duplicati-crashlog.txt The updates folder location can vary, but might be in
C:\Users\<Duplicati user account>\AppData\Local\Duplicati
Of course this obscure error file doesn’t help the typical user much. Its location might be relevant.

Your 2.0.8.1 was crashing, but had you intentionally let Duplicati autoupdate in GUI to a Canary?
Those might be sitting in your updates folder. Initial Duplicati launch is from Program Files, then it checks the updates folder and tries to run whatever’s latest and also has no unexpected change.

Updates can be corrupted by files written into them (easy to see sorting by date) or other ways.

EDIT:

2.0.8.1 Beta would not jump to Canary on its own, but Settings can change the update channel.
Basically just trying to figure out the details of how you updated, to better debug how it reverted.

is written into updates\Duplicati-crashlog.txt The updates folder location can vary, but might be in
C:\Users\<Duplicati user account>\AppData\Local\Duplicati

This is the content of my old Duplicati folder:

Anything of interest for you?

Your 2.0.8.1 was crashing, but had you intentionally let Duplicati autoupdate in GUI to a Canary?

See bullet point 1. GUI showed a manual update which I just downloaded and installed. :person_facepalming:
I assume I have somehow unintentionally changed to Canary in the GUI. :person_facepalming:

I have made a PR that changes the logic around path handling for FTP.
I would like to test it with TrueNAS, but preferably, I would like to not purchase another hardware device for testing.
Do you know or see somewhere what software+version is used for the FTP component on TrueNAS?

That seems like a logical explanation. The update checker calls different URLs for each channel, so it is unlikely that you should have seen the canary update, without manually changing the channel.

That makes sense to me.

You can see there was a backup made on roughly 2024-11-11 which is most likely the upgrade to the canary build. If you have no intention of using the canary build, you can “delete” the upgraded files. Be sure to stop Duplicati first.

Delete, or Ideally, move them to somewhere else until everything is working, then delete them later:

  • Duplicati-server.sqlite
  • IKEFDOAYGL.sqlite

Then rename/copy these two files to have those names:

  • Sicherung Duplicati-server 20241114050021.sqlite
    to Duplicati-server.sqlite

  • Sicherung IKEFDOAYGL 20241115022146.sqlite
    IKEFDOAYGL.sqlite

Then start the previous version of Duplicati and you should be back on 2.0.8.1.

Beware, as I mentioned, we will be rolling out a beta soon, which will look very similar to 2.0.9.111.
If you install that beta, it should work the same as the canary build you have, so I would appreciate if you could spend a little time on trying to figure out what the problem is with the FTP “folder not found” issue.

My best guess is that it is related to relative vs absolute paths, so there is a change in how the working folder is chosen with TrueNAS. If you can see any logs on TrueNAS when getting the error from Duplicati, that could help pinpoint the issue.

If not, I have prepared a change in how the FTP paths are used, that will be part of the next canary:

This approach is a bit more robust as it ignores the server paths and allows you to choose paths with absolute names,

Do you know or see somewhere what software+version is used for the FTP component on TrueNAS?

TrueNAS 24.04 is based on Debian Bookworm.
Unfortunately APT is disabled to ensure integrity of the OS but only one FTP service is active which is ProFTPD.
Another Debian Bookworm based server I have has ProFTPD v1.3.8 installed.
If anyone knows how to determine package version on TrueNAS Scale, please chime in.

I browsed var/log/xferlog but there is no entry for the time I was on canary.
It seems the log only shows transfered files xferlog(5): ProFTPD server logfile - Linux man page.

I just replicated my problematic installation procedure in a Win11 VM and FTP is not working on 2.0.9.111_canary_2024-11-14.

I made one backup with beta and then tried another one with canary:

This is my FTP configuration:


Also tried just test but no difference.
Failed to connect: missing-folder all the time.

I can offer to test the version containing your change.

Correction. It needs set AUTOUPDATER_Duplicati_SKIP_UPDATE=true to see the output.
Basically, early death is hard to debug. I suspect new Duplicati has also lost the crashlog.

Is this going to give a manual update offer to 2.0.8.1 users?
If so, it’d be nice to figure out what went wrong here. Ideas?

I have not seen this reported? If this is the case, it should be fixed so we can include the fix in the beta release.

Yes. The same as for canary/experimental. It will show the update and present a link to the download page.

I hope to reproduce and fix the ProFTPD issue today, and the MSI upgrade issue.

Are you refering to another issue?

Not reported very loudly, only by

The code used to be in UpdateManager in a catch inside RunMethod.
Stack traces above show it at work. That plan got removed for NET 8.

I just now tested with a manually too-high Version to check the result.

Two Application event log entries similar to 2.0.8.1 above were made.
Terminal output was made without having to suppress an autoupdate.
Duplicati-crashlog.txt was not made, at least that Everything shows.

Duplicati.GUI.TrayIcon.exe.5668.dmp was made.
in AppData\Local\CrashDump. I don’t know if 2.0.8.1 does this as well.

Yes. The seeming downgrade to 2.0.8.1 after the upgrade.to 2.0.9.111.

is unclear. @dhzl84 did you manually reinstall 2.0.8.1 again before hitting the “won’t start”?

EDIT:

Maybe 2.0.8.1 install was on list above as “5 Install release”. If so, that explains its presence and removes my concern that the new release found a way to downgrade unexpectedly like old may. Manual downgrade to avoid a new FTP issue is more appealing from an upgrade-bug viewpoint.

is unclear. @dhzl84 did you manually reinstall 2.0.8.1 again before hitting the “won’t start”?

Yes. Manual Canary install broke my FTP. Manual downgrade to 2.0.8.1 caused “won’t start”.

1 Like

Getting ProFTPD up was the key to figuring this out.

Essentially, the now-removed FTP backend would send test as the folder name, where aFTP would send /test. When we removed the deprecated FTP library in favor of aFTP (using FluentFTP), both would send /test. On many FTP servers, this has no impact as they would wisely use a virtual filesystem, starting with /.

But on ProFTPD (in some configurations) it reflects the underlying filesystem, and here /test does not exist (and user should not have permissions there). It worked before because test would translate to /home/user/test.

I have made an update to the PR that replicates this detail, so both FTP and aFTP now behave as before.

Super. I will make a new canary build shortly.

I missed that part. I have made a PR that re-introduces the crashlog.

I think this is a Windows feature, so it would probably be the same for all applications.

Ok, I understood it as later confirmed by @dhzl84 , that this was a manual upgrade.
It should not in any way be possible to auto-revert from the .NET8 builds.

There are now two versions with the (same) fixes to the FTP backend:

I tested with ProFTPD, so pretty sure it works, but it supports multiple configurations, so maybe I missed one of the variations.

Both working fine for me.

1 Like

It doesn’t, although maybe there’s a server-side hold or throttle on it to limit the rollout rate?

Test case:

Do a clean 2.0.8.1 install including new database. Start Duplicati from Windows Start menu.
About → Check for updates now or

C:\Program Files\Duplicati 2>Duplicati.Library.AutoUpdater check
No updates found

As a side note, I saw a recent Canary see Beta update, but the question here was on 2.0.8.1.

EDIT 1:

If I use Settings to change from Default (Beta) to Experimental, an OK gets the notification.

EDIT 2:

EDIT 3:

https://updates.duplicati.com/experimental/latest.manifest seems to give 2.1.0.0
https://updates.duplicati.com/beta/latest.manifest seems to give 2.0.8.1

This is the sort of server-side control I speak of, but I’m just not sure if it’s intentionally paced.

I have not yet updated the 2.0.8.1 update manifest, because the download page on https://duplicati.com/download is not yet showing the new version.

I hope to get this fixed monday and then 2.0.8.1 will start to notify about the new version.

These are the ones checked by the 2.0.8.1 and are manually updated to point to the download page. Version 2.1.x users latest-v2.manifest.