Trouble since switching to run as root

When I learned I didn’t have Duplicati running as root, I followed the advice in this thread to do so. Since then, I’ve had several problems getting backups running reliably.

Initially, Duplicati complained about thousands of “Files missing from the remote storage, please run repair,” or “Files missing from local database” (that message from memory, may not be precise). I assumed that switching to root meant it couldn’t handle the backups made under the normal user, so I deleted my backups, deleting remote files, and basically starting over. That worked, once. Successful backups were made. But then, when the scheduled backups tried to run again, I get the same errors.

Trying to delete all the backups to start over again, I am trying to import my backup configurations from files, but Duplicati just sits there spinning, with the button saying “Importing…” and it never finishes. Previously, this took milliseconds, so I don’t know what’s wrong.

Can anyone advise? I’m not sure what to do next.

Duplicati - 2.0.5.1_beta_2020-01-18
Duplicati’s logs don’t appear to be capturing anything when this happens.

In general there is no issue with doing this. Did you migrate your Duplicati databases over to where the root ones are stored? eg, instead of /home/<username>/.config/Duplicati it should be /root/.config/Duplicati.

I’m wondering if you might be accessing the wrong instance of Duplicati. When you enable the root/system level one, make sure you discontinue having your user one start up.

As for the instances of Duplicati, I think I’m okay. Does the tray icon also need to be run as root?

Here is the output of ps:

:~$ ps -elf|grep duplicati
4 S root        1258       1  0  99  19 - 36773 -      09:32 ?        00:00:00 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe
0 S root        1374    1258  0  99  19 - 278466 -     09:32 ?        00:00:03 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe
0 S ken         2173    1540  0  80   0 - 37124 futex_ 09:32 ?        00:00:00 Duplicati /usr/lib/duplicati/Duplicati.GUI.TrayIcon.exe
0 S ken         2202    2173  0  80   0 - 548250 poll_s 09:32 ?       00:00:12 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.GUI.TrayIcon.exe

I didn’t do anything specific about migrating the databases, but looking at the folders, the contents of /root/.config/Duplicati have today’s date on them. In /home/<username>/.config/Duplicati most of the files have old dates, but Duplicati-server.sqlite has today’s date.

What’s involved in migrating? I’m also open to just deleting the old database and starting fresh.

You need to use the --no-hosted-server option when you run TrayIcon. Otherwise it will start another instance of the Duplicati server instead of connecting to the service running via systemctl.

With two servers running there may be some confusion. You can view the configured jobs in each server by going to:

http://localhost:8200 (this is probably the systemctl one)
http://localhost:8300 (this is probably the TrayIcon one)

Here’s a recent thread where someone discusses it how to run TrayIcon but have it connect to the systemctl service:

Okay, I think I’ve got it. I had added the --no-hosted-server option to the Duplicati menu item, but I had not done so in the Startup Applications manager. Now, http://localhost:8200 loads the Duplicati web app, while http://localhost:8300 reports “Unable to connect.” One of my backups ran without error overnight, and manually running it again did not report errors.

Ok great, I am thinking that may have been your issue. Let us know if it fails again!