I'm currently setting up a borgmatic backup job that should get the repository from the kwallet using the following command:
kwallet-query -r systeembackup kdewallet -f borg
But unfortunately it triggers this error when I run borgmatic:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Couldn't start kwalletd: QDBusError("org.freedesktop.DBus.Error.Disconnected", "Not connected to D-Bus server")
passcommand supplied in BORG_PASSCOMMAND failed: Command '['kwallet-query', '-r', 'systeembackup', 'kdewallet', '-f', 'borg']' returned non-zero exit status 1.
Because the backup job is run as the root user to be able to perform a full system backup, the command is not able to open the KDE wallet.
I tried running it as my own user:
sudo -i -u ik kwallet-query -r systeembackup kdewallet -f borg
Without success:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-ik'
Couldn't start kwalletd: QDBusError("org.freedesktop.DBus.Error.Disconnected", "Not connected to D-Bus server")
Wallet kdewallet not found
Also not by setting the XDG variable first:
export XDG_RUNTIME_DIR=/run/user/1000; sudo -i -u ik kwallet-query -r systeembackup kdewallet -f borg
Is there a way to the password from the wallet as a privileged process/user?
Asked by aardbol
(693 rep)
Jan 4, 2020, 07:42 PM
Last activity: Sep 25, 2020, 09:56 AM
Last activity: Sep 25, 2020, 09:56 AM