Duplicati not working on Ubuntu!

Hello,

I am not a linux expert but I downloaded Duplicati, it was working fine until I deleted it and re-installed it. Now, I am having the following message everytime I run duplicati in terminal.

Crash! 
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 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0  ---> System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x00729] in <670b0e4a9ae144208688fcb192d20146>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <71d8ad678db34313b7f718a414dfcb25>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String[] args) [0x00000] in <9ce928d8db224e1f8330a80e119b5dbe>:0 

Unhandled Exception:
System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0  ---> System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String[] args) [0x00097] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager+<>c__DisplayClass58_0.<RunFromMostRecentSpawn>b__0 () [0x00000] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater (Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy, System.Action wrappedFunction) [0x00157] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn (System.Reflection.MethodInfo method, System.String[] cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x0004b] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String[] cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x0001b] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.GUI.TrayIcon.Program.Main (System.String[] args) [0x0001c] in <ca93296e82084f80be4b4a222197f416>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: A serious error occurred in Duplicati: System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0  ---> System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0 
   --- End of inner exception stack trace ---
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String[] args) [0x00097] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager+<>c__DisplayClass58_0.<RunFromMostRecentSpawn>b__0 () [0x00000] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.WrapWithUpdater (Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy, System.Action wrappedFunction) [0x00157] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecentSpawn (System.Reflection.MethodInfo method, System.String[] cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x0004b] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunFromMostRecent (System.Reflection.MethodInfo method, System.String[] cmdargs, Duplicati.Library.AutoUpdater.AutoUpdateStrategy defaultstrategy) [0x0001b] in <9ce928d8db224e1f8330a80e119b5dbe>:0 
  at Duplicati.GUI.TrayIcon.Program.Main (System.String[] args) [0x0001c] in <ca93296e82084f80be4b4a222197f416>:0 
Crash! 
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 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0  ---> System.Exception: Failed to create, open or upgrade the database.
Error message: 
The database has version 5 but the largest supported version is 4.

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 /home/yesar/.config/Duplicati.
  at Duplicati.Server.Program.GetDatabaseConnection (System.Collections.Generic.Dictionary`2[TKey,TValue] commandlineOptions) [0x0023b] in <670b0e4a9ae144208688fcb192d20146>:0 
  at Duplicati.Server.Program.RealMain (System.String[] _args) [0x002bb] in <670b0e4a9ae144208688fcb192d20146>:0 
   --- End of inner exception stack trace ---
  at Duplicati.GUI.TrayIcon.HostedInstanceKeeper..ctor (System.String[] args) [0x00093] in <ca93296e82084f80be4b4a222197f416>:0 
  at Duplicati.GUI.TrayIcon.Program.RealMain (System.String[] _args) [0x002a8] in <ca93296e82084f80be4b4a222197f416>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <71d8ad678db34313b7f718a414dfcb25>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String[] args) [0x00000] in <9ce928d8db224e1f8330a80e119b5dbe>:0

What can I do?

I removed Duplicati and Mono from the Ubuntu software center and re-installed it but without any use!

Thanks in advance!

It appears to be because you’re reinstalling an older version of Duplicati using an older database format.

Two solutions to this:

  1. Reinstall the same version as you previously used (or the newest version)
  2. Delete the local database and let Duplicati re-create it

The local database is stored in ~/.config/duplicati, so if you delete that folder Duplicati will recreate it’s config next time you start it.