I’m pretty sure this was aimed at TrayIcon and Server, but ServerUtil doesn’t accept this option:
C:\Duplicati\duplicati-2.0.9.106_canary_2024-09-03-win-x64-gui>Duplicati.CommandLine.ServerUtil.exe list-backups
Duplicati.Library.Interface.SettingsEncryptionKeyMissingException: Encryption key is missing.
at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value, KeyInstance key)
at Duplicati.Library.Encryption.EncryptedFieldHelper.Decrypt(String value)
at Duplicati.CommandLine.ServerUtil.Settings.<>c.<LoadSettings>b__28_0(PersistedSettings x)
at System.Linq.Enumerable.SelectListIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
at System.Linq.Enumerable.SelectListIterator`2.ToList()
at Duplicati.CommandLine.ServerUtil.Settings.LoadSettings(String filename)
at Duplicati.CommandLine.ServerUtil.Settings.Load(String password, Uri hostUrl, String serverDataFolder, String settingsFile)
at Duplicati.CommandLine.ServerUtil.SettingsBinder.GetSettings(BindingContext bindingContext)
at Duplicati.CommandLine.ServerUtil.Program.<>c__DisplayClass0_0.<Main>b__2(IServiceProvider _)
at System.CommandLine.Binding.BindingContext.<>c__DisplayClass16_0`1.<AddService>b__0(IServiceProvider s)
at System.CommandLine.Invocation.ServiceProvider.GetService(Type serviceType)
at System.CommandLine.Binding.ServiceProviderValueSource.TryGetValue(IValueDescriptor valueDescriptor, BindingContext bindingContext, Object& boundValue)
at System.CommandLine.Binding.BindingContext.TryBindToScalarValue(IValueDescriptor valueDescriptor, IValueSource valueSource, LocalizationResources localizationResources, Nullable`1& boundValue)
at System.CommandLine.NamingConventionBinder.ModelBinder.GetBoundValue(IValueSource valueSource, BindingContext bindingContext, IValueDescriptor valueDescriptor, Boolean includeMissingValues, Type parentType)
at System.CommandLine.NamingConventionBinder.ModelBinder.GetBoundValues(IDictionary`2 bindingSources, BindingContext bindingContext, IReadOnlyList`1 valueDescriptors, Boolean enforceExplicitBinding, Type parentType, Boolean includeMissingValues)
at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Duplicati.CommandLine.ServerUtil.Program.<>c.<<Main>b__0_1>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
C:\Duplicati\duplicati-2.0.9.106_canary_2024-09-03-win-x64-gui>Duplicati.CommandLine.ServerUtil.exe list-backups --disable-db-encryption
Unrecognized command or argument '--disable-db-encryption'.
Description:
List all backups
Usage:
Duplicati.CommandLine.ServerUtil list-backups [options]
Options:
--password <password> The password to use []
--hosturl <hosturl> The host URL to use [default: http://localhost:8200/]
--server-datafolder <server-datafolder> The server datafolder to use for locating the database []
--settings-file <settings-file> The settings file to use []
-?, -h, --help Show help and usage information
C:\Duplicati\duplicati-2.0.9.106_canary_2024-09-03-win-x64-gui>
As an unwanted workaround (anything nicer?) starting with fresh settings.json
suggests that:
C:\Duplicati\duplicati-2.0.9.106_canary_2024-09-03-win-x64-gui>Duplicati.CommandLine.ServerUtil.exe list-backups
Connecting to http://localhost:8200/...
No database encryption key was found. The database will be stored unencrypted. Supply an encryption key via the environment variable SETTINGS_ENCRYPTION_KEY or disable database encryption with the option --disable-db-encryption
which suggests using an unsupported option, which gets rejected.
was the idea in Oct 2017, but in addition to 2.0.8.1_beta_2024-05-07 starting fresh, it’s also in 2.0.2.1_beta_2017-08-01. I don’t think this memory is documented in the User’s Manual either.
There are pros and cons to memory. One con is that it’s harder to know what it got, and harder remedy if it didn’t go where desired. Restarting is easier than options or environment variables, especially for TrayIcon which is where the issue is, often is not CLI, and often loses messages.
The 2017 link later shows how memory doesn’t really solve the problem of chosen port moving:
Does it help a bit? Maybe for awhile. It can stop the port from going down, but not from going up, however I’m not sure that outweighs the increased port troubleshooting and return-to-usual pain.
The ServerUtil help is pretty brief, but help (and code) suggests that port 8200 is the default port.
Another comment in ServerUtil is there seem to be excess empty lines on list-backups
output:
1: test 1
2: ftp
3: aftp