Lose settings when changing service user account

Hey all, I used this guide (option #1) to migrate my backup to a service since I was getting some errors trying to backup different user folders on my Windows10 pc. This guide was easy to follow and I migrated it successfully.

However, one consequence of this migration is that now I am unable to see a mapped network drive in my option for source folders. The mapped drive is still there in File Explorer, and I am able to access it like normal, but in Duplicati, the drive is gone.

I saw on another article that I needed to change the user logon in the services, which I did, but it still didn’t show up. I wasn’t sure if I needed to restart my machine, so I did, and then I lost all my config files. I went back into Services and changed the logon back to the local user and the config files came back.

I’m not sure what I am doing wrong.

Thanks.

You’re not doing anything wrong - just bumping into a combination of Windows share issues and user config location changes.

Did you do step 2 of the guide to move the Duplicati folder from your user folder to the folder for the service login (if using “Local System account” it would be C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati)?

Of course that only addresses the configs issue, not the drive mapping. That can be addressed a few different ways including:

  • using a UNC path instead of drive mapping (so “\RemotePC\RemoteShare” instead of “Z:”)
  • using a --run-script-beforeparameter to map the drive and a --run-script-after to un-map it. Note that depending on your security setup this might entail having a login name / password in the script file in plain text

Thanks for the reply.

Yes, I think I did step 2 correctly. The config showed up like it should until I followed the other post’s instructions (I can’t find that post right now…I’ll try to find and link it here) that suggested going into the user logon in Windows Services. When I changed the logon, the config files were lost at the next reboot. Changing it back brought them back.

I will try using the UNC path option instead of using the drive letter and see how that goes.

ETA: Tried using the UNC path and that didn’t work either. It says that location doesn’t exist.

Well the reason you’re “losing” the configs when changing the logon is because the configs are use dependent. What you probably should try is:

  1. Look at Duplicati service to identify current logon user (such as “Bill”) then stop the service
  2. Identify the paths to the two different logon profiles (for example currently running under C:\Users\Bill\ and want it to run under C:\Users\Sam\)
  3. Manually move the C:\Users\Bill\AppData\Local\Duplicati folder into C:\Users\Sam\AppData\Local\Duplicati
  4. Change the Duplicati service logon to the new user (such as “Sam”) then start the service
  5. See if the configs moved as expected

Thanks @JonMikelV, but this still still doesn’t explain the UNC path problem. I am having the same problem. I originally used a UNC path for my source but after I completed the steps in your migrating guide, Duplicati says the UNC path “location does not exist”. Any ideas on a fix for that?

Thanks,
Chris

This means the user who is running the Duplicati service does not have read access to the UNC path you entered. Since it is running as a service, it is running in its own user session. It sounds like you may have permissions to access the UNC path while logged in as yourself, you likely have the credentials to access the UNC path cached in Windows Credential Manager so maybe you are not getting a logon prompt, but this UNC path may need credentials to access. Duplicati does not support username/password for a UNC path as a Source, it only has those options for a UNC path as a destination. Here is another post I made a while back for someone having similar issues as yourself, this is most likely what you will need to do in order to backup a UNC source that requires credentials to access:

On a slightly related note I’ve started a topic to see how much interest there is in UNC sources.