Ubuntu 24.04 Issues

It’s a bit more subtle, but I think that’s usually the case. The general idea is it’s a home directory, which means ~/ is meaningless unless user asking is said. You can also say user after the tilde:

$ head /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
$ echo ~mail
/var/mail
$ echo ~root
/root

Tilde Expansion on the bash man page details how it works.

So if you’re user root (via sudo or otherwise), ~ means one thing. Running as you, it’s another.
Duplicati, like many programs, stores data based on home directory, so the user used matters. Changing the user to a different one may get you a different home directory config + surprises.

1 Like

Thanks for this helpful lesson!
I only knew that ~ is my home dir. But that was only half the truth.

So as long as I run Duplicati as a service as root, the database is located in a ~root/ or /root/ subfolder.
If I run Duplicati manually as a user, the database will be in the user’s ~/ or /home/<user>/ subfolder.
Hopefully I’ll remember this until the next installation, when I might miss the database again :wink:

Thank you for your great support!

BTW: As for the service options, I found the explanation why I used them:
Following the installation guide from Installation - Duplicati 2 User's Manual, I copied the whole line DAEMON_OPTS="--webservice-interface=any --webservice-port=8200 --portable-mode" from the example.

@kenkendk You asked what could have been done better.
In the user’s manual linked above

Edit the file /etc/default/duplicati and add DAEMON_OPTS options to your liking: sudo nano /etc/default/duplicati

the example

# Additional options that are passed to the Daemon.
DAEMON_OPTS="--webservice-interface=any --webservice-port=8200 --portable-mode"

should be declared more clearly as just an example instead of a template.
And the word(s) (DAEMON_OPTS) options could be provided with a hyperlink that leads to the descriptions of the options at Other Command Line Utilities - Duplicati 2 User's Manual And there should again be a note under --webservice-interface that the value any can be a security risk and is not normally required.

Thanks for the feedback. I have submitted a PR for the docs to describe what you have mentioned.

1 Like