Thanks, so more reading for me to do to understand the extent of what’s been tried.
The one you quoted is how to do it (ignoring Open bug in 2.1.0.5) as per the “Mixing types” link where actual backup would be by root systemd service, however display of TrayIcon would just be a bit of GUI available to any user who has the password.
You could also run pure root by doing root login and running duplicati
, but then you’d have to do a root login, and not have any backups unless you had done one.
I’m not hearing what you had or want, beyond that you could back up /root, so you might have opted for the start-at-login option. You can also try that manually, even from a terminal, but do systemctl stop duplicati
first or it will find that root has already started a Duplicati, and it won’t start. Maybe that’s your problem currently?
Running from a terminal is also more able to show you errors if something’s wrong.
I don’t even have a Linux root login (as it’s a bad idea to run as root if not required).
I did some tests under different sudo usages, and can get a problem that possibly you’re seeing. I got a lot of X windows problems – another reason root is difficult…
This is a weird install, but I installed 2.0.8.1 from .deb, and put 2.1.0.5 into a folder from a .zip install. This plan had 2.0.8.1 pull in the dependencies it needs. 2.1.0.5 dependencies are few. Because my my usual sudo su -
breaks in X setup, I use sudo su
instead, export PS1='# '
, and export BROWSER=/usr/bin/firefox
.
To demo two-root-Duplicati, systemctl start duplicati
then try 2.0.8.1 conflict:
# /usr/bin/duplicati
Crash!
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Duplicati.Server.SingleInstance+MultipleInstanceException: Another instance is running, and was notified
at Duplicati.Server.Program.CreateApplicationInstance (System.Boolean writeConsole) [0x00063] in <17916a3bd21d425da6aeece2c5428e16>:0
at Duplicati.Server.Program.RealMain (System.String[] _args) [0x00277] in <17916a3bd21d425da6aeece2c5428e16>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0007c] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0009a] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at Duplicati.Library.AutoUpdater.UpdaterManager.RunMethod (System.Reflection.MethodInfo method, System.String[] args) [0x00000] in <a701dea807af493c8cb16ad2fe09f97c>:0
#
then try 2.1.0.5 conflict, which is a little prettier, but refuses to come up just as well:
# ./duplicati
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
Another instance is running, and was notified
#
This BROWSER variable is causing trouble, as is the su. OK, remove BROWSER for 2.0.8.1.
I also remove ~root/.config/Duplicati
, but don’t for yours unless it’s a test DB.
# /usr/bin/duplicati
and nothing more to say, and I have a TrayIcon, so good for 2.0.8.1 in this situation.
# export BROWSER=/usr/bin/firefox
# ./duplicati
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
Server has started and is listening on port 8200
but there’s no TrayIcon. So there are three ways for it to fail. It might conflict with service if service is up, it seems to need BROWSER variable set, and if that’s OK, then it might just come up on port 8200 but not show a tray icon. Note I’m still not sure that I have all the X config set up right, and my usage in a non-root login with non-root Firefox is causing some messages, so maybe TrayIcon draw is silent fail.
EDIT 1:
TL;DR try to set up a CLI start like you think your automatic startup might be doing.
If you can get that working, then see if you can port the result back to desired start.
EDIT 2:
TrayIcon comes up fine in a normal environment as a non-root user. Not even any complaint about needing BROWSER (which got other complaints, as Firefox now runs as me, and I’m trying to mix in a root
duplicati – or some complaint like that).