Seite 1 von 1

Bessere Warnung bei vorhandener Datei im TEMP-Ordner

Verfasst: Mo 17. Feb 2025, 21:27
von suchdiefiles
Hallo Alex,
in den letzten Tagen hat mich eine Warnung nach jedem Backup-Lauf beschäftigt, die sinngemäß besagte:

"File C:\_m\...\XYZ.xls could not be backuped.
Brightbits.BSH.Engine.Exceptions.FileNotProcessedException: Exception of type 'Brightbits.BSH.Engine.Exceptions.FileNotProcessedException' was thrown."

Es hat eine Weile gedauert, bis ich im Log (also Ereignisprotokoll) nachgeschaut habe, wo auch etwas mehr stand:

Code: Alles auswählen

2025-02-17 21:00:07.077 +01:00 [WRN] Could not copy file C:\_m\...\ABC.xls due to IO error.
System.IO.IOException: The file 'C:\_tmp\ABC.xls.zip' already exists.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
   at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
   at Brightbits.BSH.Engine.Storage.FtpStorage.CopyFileToStorageCompressed(String localFile, String remoteFile)
   at Brightbits.BSH.Engine.Jobs.BackupJob.CopyFileToDeviceAsync(IStorage storage, FileTableRow file, Double newVersionId, String newVersionDate, DbClient dbClient, Boolean normalCopy, Boolean useVss)
Das passt dazu, dass ich die meisten Dateitypen als ZIP packen lasse, bevor sie per FTP zum Server wandern.
Nach dem Löschen der temporären Datei war das Problem auch behoben.

Dafür hätte ich mir schon einen Tip bei der Fehlermeldung gewünscht.

Bis dann
Martin

PS. Ich nutze die Version 3.9.0.3

Re: Bessere Warnung bei vorhandener Datei im TEMP-Ordner

Verfasst: Do 20. Feb 2025, 20:49
von Alex
Sieht so aus als würde was beim Aufräumen nach einer Sicherung nicht ganz korrekt funktionieren. Ich schaue mir das mal an. Du selbst kannst da vermutlich nichts machen um das Problem zu lösen.