marvinweber / KPSimpleBackup

KPSimpleBackup - Backup Plugin for KeePass2 (compatible with IOProtocolExt)
GNU General Public License v3.0
129 stars 8 forks source link

Error "Could not find a part of the path" saving to Samba share on Win10 #34

Open btrumbo opened 3 years ago

btrumbo commented 3 years ago

When configured to save to a Samba share, I always get: [4/13/2021 8:10:31 AM] [KPSimpleBackup] [AdditionalInfo] Exception: System.Net.WebException: Could not find a part of the path 'U:\Documents\filed\keys backup\keepass\abc_2021.04.13_8.10.31.kdbx.tmp'. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'U:\Documents\filed\keys backup\keepass\abc_2021.04.13_8.10.31.kdbx.tmp'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing) at System.Net.FileWebRequest.GetRequestStreamCallback(Object state) --- End of inner exception stack trace --- at System.Net.WebClient.OpenWrite(Uri address, String method) at KeePassLib.Serialization.IOConnection.OpenWrite(IOConnectionInfo ioc) at KeePassLib.PwDatabase.Save(IStatusLogger slLogger) at KeePassLib.PwDatabase.SaveAs(IOConnectionInfo ioConnection, Boolean bIsPrimaryNow, IStatusLogger slLogger) at KPSimpleBackup.BackupManager.SavePwDatabaseToPath(IOConnectionInfo fileInfo) at KPSimpleBackup.BasicBackupManager.Backup() at KPSimpleBackup.BackupManager.Run()

marvinweber commented 3 years ago

Hi, so this does look like the path does not exists. Have you verified, that the path really exists?
And did you add the backup folder through the "Select"-Dialog (in the first tab of the settings), or as a relative path (second tab)?

btrumbo commented 3 years ago

Marvin,

As I recall, I did select the folder through tbe select dialog.  If I copy the path (up to the filename) from the error message, and paste it into Windows Explorer address bar, the folder opens. What's more, there are backup files in there, from over a month ago.  So, it seems that it worked for a while, then started giving the error.

-BLT

On 4/13/2021 11:18 AM, Marvin Weber wrote:

Hi, so this does look like the path does not exists. Have you verified, that the path really exists? And did you add the backup folder through the "Select"-Dialog (in the first tab of the settings), or as a relative path (second tab)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marvinweber/KPSimpleBackup/issues/34#issuecomment-818954540, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOOPZRLRWMGJTOLZC6TNHTTISDGHANCNFSM423ZDGIQ.

btrumbo commented 3 years ago

Marvin,

Sorry - I didn't read the question carefully enough.  I believe I used the first tab (General), not the relative path option in the Advanced tab.  Note that it is a drive-letter style path, so not relative.

I note also that the path is displayed in the dialog box (but not in the error message) with unix-style forward slashes, rather than Windows style backslashes.  I assume this is simply an artifact of the display function in KPSimpleBackup, and not an error in which Windows is being given a filename string with the wrong folder separator character.

-BLT

On 4/13/2021 11:18 AM, Marvin Weber wrote:

Hi, so this does look like the path does not exists. Have you verified, that the path really exists? And did you add the backup folder through the "Select"-Dialog (in the first tab of the settings), or as a relative path (second tab)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marvinweber/KPSimpleBackup/issues/34#issuecomment-818954540, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOOPZRLRWMGJTOLZC6TNHTTISDGHANCNFSM423ZDGIQ.

marvinweber commented 3 years ago

I note also that the path is displayed in the dialog box (but not in the error message) with unix-style forward slashes, rather than Windows style backslashes.

That should be not a problem.

Can you please check the following steps:

  1. Are backups working for another, local, path
  2. Does removing and adding again the backup path help/ fix the issue
  3. Does it work with a backup path (on the remote system), that does not contain a space (as your path seems to contain)
  4. Also, have you enabled custom file-extension in the advanced settings? If so, does it work if you disable this feature?
  5. Which version are you using? If you use 1.4, can you please check if it is working with 1.3?