Configuring backups programmatically fails erratically

I’m on Ubuntu desktop 22.04
Trying to configuring deja-dup’s backups via ansible (by means of dconf write …)
It looks like configuration succeeds (inspecting with dconf list and manually on the GUI) however running the first backup fails with “volume doesn’t implement mount”.

I guess the message is due to the fact that when deja-dup fails - for whatever reason - it removes the configuration and tries with the default (google drive).

Some more background:
My backup is on a remote network location accessed by private/public key.
I reference the identity file with the config name in .ssh/config
The connection has been successfully tested in a previous manual configuration of deja-dup that uses the same settings.

The curious thing is that if I click on “Restore from a previous backup” the restore succeeds (using a backup that I had done manually). Hence the network settings are correct. If I try and restore a second time, right away, the second time it fails with the same error above, and the configuration is lost. The only thing that is back from the config is /org/gnome/deja-dup/last-restore

I need help for of how I can move forward from here.

1 Like

Odd… that error means we are trying to mount a location that isn’t mountable (like /home/blahblah/Documents for some reason).

This usually happens because we are seeing a network protocol that doesn’t have a corresponding gvfs-backend installed (like tcp://xxx) and then (until recently) Deja Dup would try to mount /home/blahblah/tcp:/xxx thinking it was a relative path.

Now for your case… things are a bit confusing because the above doesn’t sound like it matches what’s happening.

Can you share a redacted version of the dconf settings?

Sure, thank you for looking into this.

This is what Ansible does after I have issued a: dconf reset -f /org/gnome/deja-dup/

changed: [127.0.0.1] => (item=dconf write /org/gnome/deja-dup/backend "'remote'")
changed: [127.0.0.1] => (item=dconf write /org/gnome/deja-dup/exclude-list "['Trash','Downloads','Privat','Private','privat','private']")
changed: [127.0.0.1] => (item=dconf write /org/gnome/deja-dup/include-list "['/home/pnp/Documents/paolo-bilag']")
changed: [127.0.0.1] => (item=dconf write /org/gnome/deja-dup/remote/folder "'/pnp'")
changed: [127.0.0.1] => (item=dconf write /org/gnome/deja-dup/remote/uri "'sftp://remotebackup'")
changed: [127.0.0.1] => (item=dconf write /org/gnome/deja-dup/google/folder "'quizzical-ramanujan'")


This is the config as seen from dconf.
I keep the google config, because I see that it is still present when I configure dejadup manually.

The storage location corresponds to a line in my .ssh/conf file pointing at remote location with priv/pub key authentication.

pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf list /org/gnome/deja-dup/
backend
exclude-list
google/
include-list
remote/
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/backend 
'remote'
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/exclude-list 
['Trash', 'Downloads', 'Privat', 'Private', 'privat', 'private']
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/google/folder 
'quizzical-ramanujan'
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/include-list 
['/home/pnp/Documents/paolo-bilag']
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/remote/
/org/gnome/deja-dup/remote/folder   /org/gnome/deja-dup/remote/uri      
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/remote/
/org/gnome/deja-dup/remote/folder   /org/gnome/deja-dup/remote/uri      
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/remote/folder 
'/pnp'
pnp@quizzical-ramanujan:~/Documents/systemadministration/ansible-devops$ dconf read /org/gnome/deja-dup/remote/uri 
'sftp://remotebackup'

Here it is as seen from deja-dup

Just an idea:
could it be that for creating a backup we need some library that might be missing form my distribution, while for checking a backup we don’t?

Now, to try and go forward with this, can anyone give me some hints for how to go about making deja-dup output some more debugging info.
That would be really appreciated!

Maybe one more useful hint about what might go wrong or where:

After having configured with Ansible,
I open the “preferences” manually and as soon as I click on the setting selector for: “Backup Automatically” , the location immediately switches back to Google drive. I don’t even need to run a backup.

You can get more debugging info by running it with DEJA_DUP_DEBUG=1, but I fear that it wouldn’t help here - that mostly outputs data about the backup process itself, not the preparation steps like mounting the destination.

That setup looks correct to me.

I open the “preferences” manually and as soon as I click on the setting selector for: “Backup Automatically” , the location immediately switches back to Google drive. I don’t even need to run a backup.

That’s weird…

One thing to try is the latest flatpak release? I wonder if that has fixed something I forgot about?

I found my error:
As it is stated in: Custom default values for system settings

“When the user profile is created or changed, the user will need to log out and log in again before the changes will be applied.”
This obviously is also true when setting options directly with dconf.
So, to be clear, one has to:

  • set options programmatically with dconf
    • ask the user to log out and log in again to make those changes usable.

I wonder if there is a way to programmatically fully load those settings without having the user actually log out?

1 Like