Why does Deja Dup use Nautilus for SSH? This leads to unexpected behavior.

Asked by Robert Trevellyan

I've been testing Deja Dup 18.1.1 on Ubuntu 1104 running in VirtualBox and it performs as expected with an attached hard drive and with Amazon S3.

In all cases, I set the destination folder to be VBoxUbuntu1104, just to keep things tidy.

When I tried using a NAS as an SSH destination, it kept failing with "unknown reason". Each time it would mount an SFTP volume on the desktop, rooted at my user folder on the NAS, but fail to write anything.

After much frustration I tried using my Mac as a destination. Much to my surprise, it created a folder named VBoxUbuntu1104 in the root folder and proceed to to backup there.

This explains why it failed with the NAS as a destination - I didn't give my user account read-write access to the root folder. I was then able to get it to work by specifying the absolute path to my home folder as part of the destination.

What I would expect:
1. If the destination isn't writable, display an error message.
2. Don't require an absolute path to the destination folder.

Observations:
When I run duplicity with an SSH URL as the destination at the command-line, I don't have to use the absolute path to the destination folder. On the contrary, a // is required after the host-name to force it to accept an absolute path, otherwise the path is relative to the home folder of the SSH user. I would expect Deja Dup to behave the same way.

EDIT (summary changed too)

It finally dawned on me (yeah, I know) that this behavior may be due to Deja Dup passing responsibility for SSH to Nautilus instead of to Duplicity - hence the appearance of the mount point on the desktop whenever Deja Dup is asked to use an SSH destination. Apparently the Nautilus SSH/SFTP feature connects to the root folder instead of (or as well as, confusingly) the home folder, which is either a known issue or intended behavior, depending on your point of view.

Is my understanding correct, and if so, why does Deja Dup do it this way? The obvious approach would be to use Duplicity's SSH support, for consistency and since it's there, but maybe there's some compelling reason not to do so.

Question information

Language:
English Edit question
Status:
Solved
For:
Déjà Dup Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Trevellyan
Solved:
Last query:
Last reply:
Revision history for this message
Michael Terry (mterry) said :
#1

It uses nautilus for consistency too, just of a different sort. This way Deja Dup can talk to all the same servers your file browser can. Additionally, nautilus's external server support tends to be more reliable than duplicity's. And it has wider support for different protocols (like samba).

Revision history for this message
Robert Trevellyan (trevellyan) said :
#2

Hi Michael,

Congratulations on making it into 11.10! I look forward to trying out the new version.

Would it still make sense to connect by default to the home folder instead of the root folder? This would (sort of) match what happens when using Places | Connect to Server or Go | Location... True, when the connection is first made, a Nautilus browser window opens at the root. However, a double-click on the desktop icon for the connection, or a single click on the shortcut in the Side Pane, both go to the home folder.

Revision history for this message
Michael Terry (mterry) said :
#3

Yes. I created a new bug to track the progress. It won't happen sooner than 22.0 though. In the meantime, always enter a full path.

Revision history for this message
Robert Trevellyan (trevellyan) said :
#4

Fair enough :o)

Revision history for this message
Florian Stoll (flostoll) said :
#5

I have a problem with SSH which seems to be the same as described here.
If I enter my SERVER, PATH "/srv/storage" and USER "backupuser" in the dejadup-GUI it will backup to this folder as expected. But it will never delete old full backups and the automatically mounted folder in nautilus is empty!
To handle that problem I created a symlink like that on the server:
ln -s /srv/storage /home/backupuser/srv/storage

That problem seems to be that it connects to the server and jumps to the home dir of the user logged in, but the path given in the gui is treated as an absolute path, starting from root directory.