Bug 445391 - Selecting a SMB network share results in "backup destination cannot be reached"
Summary: Selecting a SMB network share results in "backup destination cannot be reached"
Status: RESOLVED FIXED
Alias: None
Product: kup
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Persson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-12 19:43 UTC by lrdarknesss
Modified: 2023-02-24 00:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lrdarknesss 2021-11-12 19:43:03 UTC
SUMMARY
Hi,
i tried using Kup to backup my files to our NAS.
In the settings i used the file picker and navigated to the NAS via the network tab.
This resulted in smb://192.168.0.97/NasStorage/Backup/Computer/Laptop/ as the destination, which is a folder that can be reached just fine with dolphin.

Is this a known limitation/ bug?

Steps:
1. Create a new backup Task
2. Select a SMB share in the file picker using the network tab/ category
3. Try to start the backup via the tray icon

OBSERVED RESULT
Then i tried to actually start the backup, but when i hover over the tray icon it always reports "Sicherungsziel nicht erreichbar" which can be translated into "backup destination cannot be reached".

EXPECTED RESULT
Kup should backup to the NAS.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  Kubuntu 21.04
(available in About System)
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 ianp 2021-12-05 10:00:14 UTC
I have this same problem in Kubuntu 21.10:
1) NAS device is attached and accessible through Dolphin. 
2) Share is read/writable. Device is awake.
3) Backups application (Kup) definition: "Destination" allows navigation and selection of a folder on the NAS share
4) Schedule is set to start. 
5) System tray Icon appears. Tooltip on the Icon says "Backup destination not available"
6) No manual start option is available.
7) No workaround found.
Comment 2 Chris Rizzitello 2021-12-05 15:01:23 UTC
This is not a "bug"
The end user must mount a SMB share to use as an rsync target.
Rsync is known to not work well over the smb protocol

The Issue at hand is that we need to communicate this to the user. If they select a location to store the backup that is a remote share it must be of sftp(ssh) or rsync type. If the user has selected a path mounted via kio like a temp smb path (i.e smb://server/share)  in dolphin we need to warn that the path is temporary mount point.
Comment 3 ianp 2021-12-05 15:32:13 UTC
Yes. The application really needs to either make it clear that it has created an invalid definition. Or better, not allow an invalid definition that cannot work.
Alternatively, if mounting is really necessary, it should be able to be able to mount the selected location at the same time.  As it's not possible for end users to mount network shares themselves.
Comment 4 lrdarknesss 2021-12-05 23:08:11 UTC
Hmm okay that makes this problem a lot clearer to me.
My server (TrueNAS) supports the rsync daemon, but it seems quite complicate to setup and use the rsync protocol.
Kup doesn't provide any feedback to the user when something went wrong, for example permission errors.
The only way to debug this, is to use the rsync cli from the commandline and look for the output there.

It would be very handy if Kup would support mounting SMB shares for the user. 
If that's out of scope, it should really improve the file chooser or at least clearly state which type of paths can be entered.
Comment 5 Simon Persson 2021-12-06 13:16:29 UTC
I agree that there could be an error message displayed to the user when selecting a path for local filesystem destination which is actually not in the local  filesystem. I will work on adding that when I find the time, but if anybody wants to help... Please go ahead!
Comment 6 Jacek Rzęsista 2022-02-03 10:59:45 UTC
(In reply to Chris Rizzitello from comment #2)
> This is not a "bug"
> The end user must mount a SMB share to use as an rsync target.
> Rsync is known to not work well over the smb protocol
> 
> The Issue at hand is that we need to communicate this to the user. If they
> select a location to store the backup that is a remote share it must be of
> sftp(ssh) or rsync type. If the user has selected a path mounted via kio
> like a temp smb path (i.e smb://server/share)  in dolphin we need to warn
> that the path is temporary mount point.

I have a question about sftp(ssh) type :) What kind of path do I have to set in kup to get it work ? When I try path like this:
sftp://user@destination_ip/path_to_folder/on_destination
I still got tooltip in systray with info about that backup's destination is unreacheable.
Comment 7 Simon Persson 2022-02-03 13:22:08 UTC
(In reply to Jacek Rzęsista from comment #6)
> (In reply to Chris Rizzitello from comment #2)
> > This is not a "bug"
> > The end user must mount a SMB share to use as an rsync target.
> > Rsync is known to not work well over the smb protocol
> > 
> > The Issue at hand is that we need to communicate this to the user. If they
> > select a location to store the backup that is a remote share it must be of
> > sftp(ssh) or rsync type. If the user has selected a path mounted via kio
> > like a temp smb path (i.e smb://server/share)  in dolphin we need to warn
> > that the path is temporary mount point.
> 
> I have a question about sftp(ssh) type :) What kind of path do I have to set
> in kup to get it work ? When I try path like this:
> sftp://user@destination_ip/path_to_folder/on_destination
> I still got tooltip in systray with info about that backup's destination is
> unreacheable.
What you can do is to install sshfs, mount the remote folder to some local folder, configure kup to save to some path under that local folder. Kup will monitor the local folder for mount and unmount events. So just make sure to always mount that server to the same local path.
Comment 8 Jacek Rzęsista 2022-02-03 16:34:57 UTC
(In reply to Simon Persson from comment #7)
> (In reply to Jacek Rzęsista from comment #6)
> > (In reply to Chris Rizzitello from comment #2)
> > > This is not a "bug"
> > > The end user must mount a SMB share to use as an rsync target.
> > > Rsync is known to not work well over the smb protocol
> > > 
> > > The Issue at hand is that we need to communicate this to the user. If they
> > > select a location to store the backup that is a remote share it must be of
> > > sftp(ssh) or rsync type. If the user has selected a path mounted via kio
> > > like a temp smb path (i.e smb://server/share)  in dolphin we need to warn
> > > that the path is temporary mount point.
> > 
> > I have a question about sftp(ssh) type :) What kind of path do I have to set
> > in kup to get it work ? When I try path like this:
> > sftp://user@destination_ip/path_to_folder/on_destination
> > I still got tooltip in systray with info about that backup's destination is
> > unreacheable.
> What you can do is to install sshfs, mount the remote folder to some local
> folder, configure kup to save to some path under that local folder. Kup will
> monitor the local folder for mount and unmount events. So just make sure to
> always mount that server to the same local path.
OK, thanks for the info, you inspired me to this: https://forum.kde.org/viewtopic.php?f=225&t=173986&p=452664#p452664
I think it is good and working solution to get kup working over ssh :-)
Comment 9 Simon Persson 2023-02-24 00:29:28 UTC
Git commit 13b10dad891d281e2a0c6aac7c15211bb8dbd692 by Simon Persson.
Committed on 24/02/2023 at 00:28.
Pushed by persson into branch 'master'.

Add warnings to user about problems with filesystem destination
Related: bug 458327

M  +50   -1    kcm/backupplanwidget.cpp
M  +3    -0    kcm/backupplanwidget.h

https://invent.kde.org/system/kup/commit/13b10dad891d281e2a0c6aac7c15211bb8dbd692