Thank you very much for the analysis which is 100% correct. I can’t really test on OSX anymore since the Logicboard of the MacbookPro is broken and I’m switching back to a windows machine now (thats the reason I have to restore the backup ).
I’ve added a try/catch around the restore of empty files in the source code logging the errors as a warning and just continue.
When doing a small test restore the restore run now executes successful till the end and ends up in the following warnings and errors (the “Failed to restore empty file” is the warning I’ve added).
"Warnings": [
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Failed to restore empty file: \"c:\\m9\\Applications\\Chrome Apps.localized\\Icon\r\", message: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.\r\n",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Failed to restore empty file: \"c:\\m9\\Applications (Parallels)\\Icon\r\", message: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.\r\n",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Failed to restore empty file: \"c:\\m9\\Applications (Parallels)\\{87a8ebe4-2c4e-49c4-8ead-ac3b47a82567} Applications.localized\\Icon\r\", message: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.\r\n",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\Icon\r\", message: Unexpected character encountered while parsing value: o. Path '', line 1, position 102400.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\{87a8ebe4-2c4e-49c4-8ead-ac3b47a82567} Applications.localized\\Icon\r\", message: Unexpected character encountered while parsing value: T. Path '', line 1, position 102400.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications\\Chrome Apps.localized\\Icon\r\", message: Unterminated string. Expected delimiter: \". Path '['unix-ext:com.apple.ResourceFork']', line 1, position 102397.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\Icon\r\", message: Unterminated string. Expected delimiter: \". Path '['unix-ext:com.apple.ResourceFork']', line 1, position 102397.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\{87a8ebe4-2c4e-49c4-8ead-ac3b47a82567} Applications.localized\\Icon\r\", message: Unexpected character encountered while parsing value: U. Path '', line 1, position 204800.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications\\Chrome Apps.localized\\Icon\r\", message: Unexpected character encountered while parsing value: k. Path '', line 1, position 204800.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\Icon\r\", message: Unexpected character encountered while parsing value: T. Path '', line 1, position 307200.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\{87a8ebe4-2c4e-49c4-8ead-ac3b47a82567} Applications.localized\\Icon\r\", message: Unexpected character encountered while parsing number: v. Path '', line 1, position 307201.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications\\Chrome Apps.localized\\Icon\r\", message: Error parsing NaN value. Path '', line 1, position 307201.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\Icon\r\", message: Unexpected character encountered while parsing value: b. Path '', line 1, position 204800.",
"2020-09-17 07:16:39 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\{87a8ebe4-2c4e-49c4-8ead-ac3b47a82567} Applications.localized\\Icon\r\", message: Unterminated string. Expected delimiter: \". Path '['unix-ext:com.apple.ResourceFork']', line 1, position 102397.",
"2020-09-17 07:16:40 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications\\Chrome Apps.localized\\Icon\r\", message: Unexpected character encountered while parsing value: H. Path '', line 1, position 102400.",
"2020-09-17 07:16:40 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\Icon\r\", message: Error parsing boolean value. Path '', line 1, position 409601.",
"2020-09-17 07:16:40 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: \"c:\\m9\\Applications (Parallels)\\{87a8ebe4-2c4e-49c4-8ead-ac3b47a82567} Applications.localized\\Icon\r\", message: Unexpected character encountered while parsing value: O. Path '', line 1, position 409600."
],
"Errors": [
"2020-09-17 07:16:40 +02 - [Error-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.\r\n",
"2020-09-17 07:16:40 +02 - [Error-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.\r\n",
"2020-09-17 07:16:40 +02 - [Error-Duplicati.Library.Main.Operation.RestoreHandler-RestoreFileFailed]: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.\r\n"
],
I’ll keep my local code as is and now trigger a full restore of all files. I’d expect that I’ll run into a couple of Warnings for the Icons but apart from that everything else will work. Obviously I don’t really need the Icon files to be restored as I don’t have a use for them on Windows.
I guess there is no way to reproduce this in a unit test (unless we create a backup of such a file on linux, check it in and then add a unit test to restore that backup).
I’m not sure If I should
- only commit the added debug profiling logging
- or also the catch/ignore exception
as part of the GitHub issues I’ve created? Any opinion about that?