Two update directories - which one is used?

Somehow my Duplicati installation (Windows service) got corrupted a few weeks ago - possibly due to a Windows update. I did not notice it for a while. When I did, I was able to get it running again by updating to version 2.0.5.1.

When doing some forensics I noticed several directories related to Duplicati and I wonder which ones are actually used. Thats what I found:

  • C:\Program Files\Duplicati - this one contains the original installation, not the current version. The Windows service points here, so I assume this is only the entry point that delegates to one of the update directories.
  • C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati - here is a Duplicati-server.sqlite plus two more active sqlite-Databases corresponding to my backups.
  • C:\Users\{myusername}\AppData\Local\Duplicati - here I found another Duplicati-server.sqlite and several sqlite-Databases, that seem to be leftovers from previous configuration attempts. Plus there is a subdirectory updates\2.0.5.1 with full Duplicati installation
  • C:\ProgramData\Duplicati - here I found another subdirectory updates\2.0.5.1 with the same full Duplicati installation.

I would like to clean-up my system and I wonder if some of these files or directories are obsolete and could be removed. How can I find out, which ones I can remove? In particular, which of the two update directories is the active one?

This is not at all urgent, since my backups are running just fine. But I would appreciate some hints how to keep my system clean. Thanks in advance!

Gerhard

Windows version upgrades (not monthly updates) move Duplicati from SYSTEM profile to Windows.old, which isn’t great (especially if you don’t notice before Windows removes that folder). For a service, safer places for Duplicati config use Duplicati.Server.exe options --portable-mode or --server-datafolder which you can add by editing the service in Windows, or pass as Duplicati.WindowsService.exe options.

This is odd though, although details are scarce. If it was a Windows wipeout, you’d lose the configuration.

Downgrading / reverting to a lower version talks about locations. It sounds like your service is likely using C:\ProgramData\Duplicati, but if you start Duplicati as you logged in, that’s the one in the user profile.

Sysinternals Process Explorer shows what executable image a process is on if you mouse-hover over it.
Task Manager can probably do this if you select an Image path name column. Duplicati processes often come in pairs, with the initial launch from Program Files, then child on whatever’s the latest update found.

Thanks for these hints!

If it was a Windows wipeout, you’d lose the configuration.

Indeed my configuration had been lost, but I since it was relatively simple I was able to reconstruct it pointing to the same backup location.

For a service, safer places for Duplicati config use Duplicati.Server.exe options --portable-mode or --server-datafolder

With

Duplicati.WindowsService.exe uninstall
mkdir C:\ProgramData\Duplicati\config
copy C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati C:\ProgramData\Duplicati\config
Duplicati.WindowsService.exe install --server-datafolder=C:\ProgramData\Duplicati\config

I was able to move my configuration to a safer location, as you recommended.

It sounds like your service is likely using C:\ProgramData\Duplicati, but if you start Duplicati as you logged in, that’s the one in the user profile.

Looking at the various Duplicati processes could verify that indeed the Server (running as a service) uses C:\ProgramData\Duplicati\updates whereas my Tray Icon uses C:\Users\{myusername}\AppData\Local\Duplicati\updates. So, as long as I keep using the Tray Icon, I obviously will need both directories.

Yes, this is somewhat awkward from a disk usage point of view. I’m actually not quite sure how automatic updating happens in a configuration (which possibly is yours) where TrayIcon is using --no-hosted-server. How does server say that it needs an update? Or I wonder if this is a gap (one of many) around updating?

How does server say that it needs an update?

As far as I remember, an available update is shown only when opening the UI in the browser. I don’t remember a tray icon notification or anything like that. Not sure if this should happen, if TrayIcon ist started without --no-hosted-server. For me that’s just fine. It’s better to open the UI every now and then and check this and other things. (If I had done that more regulary I probably could have recovered my configuration from the Windows.Old directory :slight_smile: ).

Also the double disk usage for the update directories doesnt bother me. I just don’t want to keep an abandoned directory that’s good for nothing.