Release: 2.0.9.100 (Canary) 2024-05-30

2.0.9.100_canary_2024-05-30

This release is a canary release intended to be used for testing in preparation of a later stable release.

Unlike regular canary builds, this one has a major change in the build system, so it now runs on .NET8.

For that reason, the updater in previous canary builds does not detect this update yet, but this can be activated at a later time.

These are some of the major changes that can cause surprises, so please review and see if any are relevant for your usage:

  • Changed runtime to .NET8, shipping with dependencies, no more Mono or .NET install required
  • Changed from portable executable to operating system and CPU architecture dependent packages
  • Server database with SQLite is no longer “encrypted” with RC4, running a new canary or later will decrypt the database
  • The executable Duplicati.Library.AutoUpdater.exe is renamed to Duplicati.CommandLine.AutoUpdater.exe and has limited functionality
  • The Windows MSI installer has been reduced, it offers essentially no options for now and no UI
  • The updater has been rewritten to rely on installing the packages, instead of having the “in-place” updates
    • There are now longer a spawned secondary process
    • The updates folder can be deleted
    • Installing an update now requires manually downloading and running the installer (you still get a notice)
  • To fit better with non-Windows systems the executables on non-Windows are all lower-case and prefixed with duplicati:
    • Duplicati.GUI.TrayIcon.exeduplicati
    • Duplicati.CommandLine.exeduplicati-cli
    • Duplicati.RecoveryTool.exeduplicati-recovery-tool
    • … and similar for others

More detailed list of changes:

  • More than 300 commits for the change to .NET8, credits to @mnaiman, @tsuckow, @Jojo-1000, @npodbielski and many others
    • These commits were done over many years an accumulated, so here is a summary
    • Changes to support new .NET framework methods
    • Changed to use Avalonia UI instead of WinForms
    • Removed mono support and requirement
    • Upgraded packages
    • Reworked binaries and some queries for SQLite
  • 1MiB blocksize default, thanks @mr-russ
  • IOScheduling for RPM packages, thanks @achims311
  • Selective dynamic loading of modules to avoid loader errors
  • New manifest for updater
  • Added GNUGP to Docker, thanks @wjansenw
  • Improved cross-platform support, thanks @SimonNyvall
  • Fixed issue with custom reporting message for http-modules
  • RC4 database encryption
  • Fixed issues with recoverytool, thanks @Jojo-1000
  • Additional quota control options, thanks @Jojo-1000
  • Improved file-source picker with filters, thanks @Jojo-1000
  • Fixes to forced local, thanks @Jojo-1000
  • Fixed an issue with OpenStack loosing username and password, thanks @Jojo-1000
  • Improved handling of boolean options in the UI, thanks @Jojo-1000
  • Fixed issues with missing executables and permissions on non-Windows
  • Fixed an issue when restoring without a localdatabase, using non-default blocksize, and no parameters
  • Rebuilt the MSI proces for wixl support
  • Added Win-Arm64 support
1 Like

Nice work reaching this milestone!

1 Like

Is an “install as a service” (so that it can use VSS, access all files, etc) planned?

I’m using “nssm” for now, but native support would be nice…

Yes!

For now, there is a executable that is called Duplicati.WindowsService.exe that you can call like this:

Duplicati.WindowsService.exe install

You can run it from a terminal/powershell to see detailed usage.

It is not part of the installer, because using it this way exposes a webserver that runs with Administrator privileges, which I do not recommend.

Once we get a better auth mechanism implemented, it will be an option in the installer to add the privilege elevation service, and only that part will then run as a service.

1 Like

Unfortunately, this does not work for me:

PS D:\Desktop> "C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" install
In Zeile:1 Zeichen:61
+ "C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" install
+                                                             ~~~~~~~
Unerwartetes Token "install" in Ausdruck oder Anweisung.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

PS D:\Desktop> cmd
Microsoft Windows [Version 10.0.26227.5000]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

D:\Desktop>"C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" install
Duplicati service installation failed. Exception: Win32 error 1073 during install service (CreateService)

Does anyone have any ideas?

The first one with “UnexpectedToken”, I have no clue. It happens in PS not in Duplicati as far as I can see.

The second one has Win32 error 1073 which may mean “already installed” ?

Also, do you have admin privileges when running the command?

Many thanks for the quick help! Restarting the PC, uninstalling and reinstalling again has helped. The service was obviously still marked for deletion.

Other question: Previously, the configuration was saved as a service in this file during installation: C:\ProgramData\Duplicati\Duplicati-server.sqlite

I no longer have this file, but the service obviously saves its configuration somewhere, as the data entered is still available after restarting the PC. But where, I can’t find it? Registry, file system?

Today is not my day. Everything as before. If you install the service like this, the configuration is in the corresponding directory:

"C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" install --log-retention=1D --server-datafolder=%ALLUSERSPROFILE%\Duplicati

I don’t user PowerShell much due to quirks like this, but I think this is the explanation. Try with & in front:

8. Statements

Ordinarily, a command is invoked by using its name followed by any arguments. However, the command-invocation operator, &, can be used. If the command name contains unescaped white space, it must be quoted and invoked with this operator.

Similar test can be done with:

PS C:\> "C:\Windows\System32\notepad.exe" install
At line:1 char:35
+ "C:\Windows\System32\notepad.exe" install
+                                   ~~~~~~~
Unexpected token 'install' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

PS C:\>

Not really. That’s Duplicati server configuration file, but isn’t related to Windows service.

Windows service mechanism is internal to Windows, and used through a variety of UIs.

Are you saying it did just what you asked? Are you looking for a previous config or what?

The default location, if you ran Duplicati as a service before, is in a fragile folder which is
C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati, a.k.a.
%LOCALAPPDATA%\Duplicati for the SYSTEM user. It’s best to move it elsewhere since
this area tends to get moved to C:\Windows.old on Windows version updates. Not good.

Basically please clarify the problem. If there was a Duplicati before, please describe that.

I apologize, that was not clearly described. Duplicati works in terms of configuration and installation as in the previous version.

So, I always install like this:

“C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe” install --log-retention=1D --server-datafolder=%ALLUSERSPROFILE%\Duplicati

The configuration is then here:

C:\ProgramData\Duplicati\Duplicati-server.sqlite

And that works wonderfully. No more questions (for now), and thanks for the help! :slight_smile:

2 Likes

Finally getting around to testing this on one of my Windows servers, but wanted to know before I do: Is the MSI parameter FORSERVICE=“true” still accepted?

Yes! All options that worked before should work again.

1 Like

Thanks, I’ll let you know how it goes

First test on Windows Server 2022, upgrading from the last beta 2.0.8, and it’s not good news.

The install seemed to go without incident using the MSI with the “FORSERVICE” setting as mentioned before, but the service will not start. I get in the event log:

Application: Duplicati.WindowsService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeLoadException
   at Duplicati.WindowsService.Program.Main(System.String[])

Faulting application name: Duplicati.WindowsService.exe, version: 2.0.8.1, time stamp: 0x663a1359
Faulting module name: KERNELBASE.dll, version: 10.0.20348.2461, time stamp: 0x6008e061
Exception code: 0xe0434352
Fault offset: 0x000000000003f19c
Faulting process id: 0xb7c
Faulting application start time: 0x01dab8c922cc062e
Faulting application path: C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: e96e8aaa-ca17-4dd7-855b-5b553a2e14e7
Faulting package full name: 
Faulting package-relative application ID: 

The service command I use is, which uses Local System:

"C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe" /localuser "--webservice-sslcertificatefile=C:\ProgramData\Duplicati\lisa.mydomain.com.pfx" "--webservice-sslcertificatepassword=12345"

Also, the installer added the trayicon in addition to my own but I’m not sure if it will work until I can get Duplicati to start.

The one I currently had to set up on each Windows machine ran:

"C:\Program Files\Duplicati 2\Duplicati.GUI.TrayIcon.exe" --no-hosted-server --hosturl=https://%COMPUTERNAME%.mydomain.com:8200

Let me know if you need any more information.

The error message does unfortunately not reveal much about the source :confused:

  • Can you start Duplicati.Server.exe from a commandline?
  • Can you try to re-install without the FORCESERVICE parameter? (I don’t expect it to do a difference though)

If I run it from the command line, where will it grab the profile from?

To get around the issue where major Windows updates doesn’t move the systemprofile folder, I have in place directory links in the Local and Roaming folders that replace the real Duplicati folders but point at where they really should be, “C:\ProgramData\Duplicati”. After an upgrade and before running Duplicati I make sure the two links are recreated with mklink.

image

It will use %APP_DATA%\Duplicati by default, but you can pass the same arguments as you did for the service (the service actually passes them to the server).

But the error you see happens when the service starts, and indicates that some library is missing.

By starting the server, we can isolate if the problem is with the service (my best guess) or generally with Duplicati.

From the command line this is all I get:

Unhandled Exception: System.TypeLoadException: Could not load type 'System.Object' from assembly 'System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because the parent does not exist.
   at Duplicati.Server.Program.Main(String[] args)

Reinstalling without the parameter made no difference.

That message suggests that the bundled . NET is broken.

It could be the installer that copies the wrong files, but I have not seen this in my tests. I tested with Win11 on x64 and Arm64.

What OS version and CPU Arch are you using here?

Also, could it be some security/AV tool is preventing the libraries from loading?

Could you try to download the zip version instead, and perhaps compare what you have installed via MSI and via Zip?