Warnings: Failed to apply metadata to file


#1

I just did a test restore which restored all data as it was supposed to as far as I can see but I got this error message which I’m of course wondering about. What does it mean?

Warnings: [
Failed to apply metadata to file: “K:”, message: Object reference not set to an instance of an object. => Object reference not set to an instance of an object.

What I restored was a couple of folders containing flac files. I did not restore to original location but restored these few folders to the root of one hard drive.


#2

Were you by chance test restoring to a FAT32 formatted USB drive with the drive letter K?

I believe the type of metadata involved varies depending on OS and even disk format, so if you backed up from something like an NTFS formatted drive (which supports user restrictions in metadata) but restored to something like a FAT32 formatted drive (which doesn’t do user level restrictions) you might get an error such as that…

Though I’m not sure why it’s reporting the drive letter with no file name…


#3

Original location was on NTFS and restore was too.

It probably has something to do with the source being a couple of subfolders and the restore destination being these subfolders placed in the root of a disk. Why Duplicati would try to set rights to the root (K:) in this scenario I don’t understand though. It might be a bug.


First install, warning detected during restore
#4

I tried making a test job that backs up a single file from an NTFS drive then restore it onto the rood of another NTFS drive and I’m not getting any errors. Maybe it has to do with the specific metadata involved in your setup.

If you have time and feel like helping out, can you make a test job that just backs up a single file from your current job then try restoring it to K:?

(Oh, and I’m assuming this is all on the same machine at your end - not between machines.)


#5

I tried backing up a single file and then restore the file to the root, no error. Then tried with a whole subfolder and restored the files (not the folder as I did last time) to the root of the same drive and got the same error as before. I noted I did not have “Restore read/write permissions” checked. So I tried with it checked but got the same error.


#6

I’ll try to find some time to replicate that and see if I get the error as well. I wonder if Duplicati is treating the drive root as if it were a subfolder and attempting to apply the source folder metadata to it…


#7

Yeah that sounds quite likely. And it hasn’t got the rights enough to change that.


First install, warning detected during restore
#8

I’ve been able to replicate the error and found where the “Failed to apply metatadata to file” message comes from in the code (the ApplyStoredMetadata method of RestoreHandler.cs).

I need to do some test builds to narrow down if it’s in ApplystoredMetadata or ApplyMetdata but I think I our guess (apply folder data to a drive root) is what’s going on.


#9

I had the same problem (duplicate thread here: https://forum.duplicati.com/t/first-install-warning-detected-during-restore/2521).

I backed up a file that was in a nested folder and restored to the root of E. The file restored successfully, but it gave the same error as the first post. Both locations were NTFS.