Error Unexpected difference in fileset version

Please need help how to solve error on backup. When start backup get an error message

Unexpected difference in fileset version 1: 21.1.2019. 17:51:04 (database id: 1), found 17846 entries, but expected 17868

Hello @komir2004 and welcome to the forum!

I noticed from Upload speed to Google Drive that you might have a poor Internet connection. That might be related to this failure. My way of reproducing a similar failure involved a connection with a simulated failure.

Especially if you have any added logs, they would be worth a look. Alternatively, just look at your job logs in Job --> Show log --> General (or other backup reports if you have any) for problems up to 2 versions back.

Message reference to “version 1” means (I think) that the problem was discovered on the previous backup. The way to resolve it so that further backups can continue is simply to delete the version with the problem.

Here are some directions, and because your message says “version 1”, the –version to delete would be 1.

Maybe after things are back to normal, we can look for clues about what led up the error, so it can be fixed.

Looks like I have the same issue :
Unexpected difference in fileset version 3: 2019-01-06 8:00:01 PM (database id: 4), found 362 entries, but expected 364
==> Database repair, Recreate delete&repair . did not fix the issue, whats next ?

Perhaps back up to the post above yours, adapt the --version to use yours, and try deleting the bad one.

Especially if you can find any sign of backup interruptions (including by network) before the issue arose, there’s now a reproducible test case for this problem, and any other known ways to create it would help:

Error / DB corruption: Unexpected difference in fileset version X: found Y entries, but expected Z #3644

@komir2004 do you have special retention settings on this job? I have one job that keeps failing with this error and I have “Keep a specified number of backups” set to 4. Every 4th day my jobs start failing with this error. I have a suspicion there might be something in the retention code that might be causing it. I’m going to wipe the job and backup files and go back to the default “older than” retention to see if that helps.

Wouldn’t any setting of a specified number of backups delete an old backup for each new one made, at least after count hits its limit? I’m not following how the first 4 relates to the 4th day failure. How often are backups?

I don’t know; this is the only difference between this job and several others that all have the same source and run daily at the same time. I’m grasping at straws but this one job just keeps failing.

and possibly you found one, odd as it may seem. Probably needs more testing, so thanks for keeping at it. The first straws some others found involved network errors or maybe other interruptions that went badly…

“Unexpected difference in fileset” errors [2.0.3.9]
Reproducible: Unexpected difference in fileset version X: found Y entries, but expected Z

If you can keep it happening regularly, that will help understand it, but the job probably must add logging to give some trail of how it went badly, for example, –log-file and –log-file-log-level=Information or even more. You can also watch the failure live if it’s predictable enough. Job logs might even already have information.

Thank you for the tip - I will add logging. The job just ran (manually) OK. I should try a restore to see how things look, though there were no errors. If I find anything else I’ll post it. I did change the retention to 1 week from 4 backups.

I’m having the same issue, older backups were deleted and this error started happening whenever new backups were made.

Does this mean you added a new retention policy, did manual deletes (which is the way to try to repair this), or something else? Regardless, if your issue is similar, please follow the troubleshooting steps given earlier.

It happened indeed after changing the retention policy and running a new backup.

I’ll try to troubleshoot and get back on this topic once I’m going back on the machine.

A quick update - 5 days ago I made a copy of the working job and set retention to “4 backups”. This morning on the 5th run I got a different warning:

2019-02-22 04:27:30 -08 - [Warning-Duplicati.Library.Main.BackendManager-DeleteRemoteFileFailed]: Delete operation failed for duplicati-20190222T113831Z.dlist.zip.aes with FileNotFound, listing contents

It’s not the same as an unexpected difference in fileset, but the fact that an error showed up on this day is interesting. The backup job (same destination - dropbox - but a different folder of course) with the retention set to delete older than 1 week has run for 13 days without error and has 8 saved versions. To my knowledge the only difference between these two jobs other than the destination folder is the retention setting. I created this test job by exporting the config from the working job, importing, and only tweaking those two things before I saved it.

Some detailed log lines are below. Of interest, if I’m reading this correctly, is why it renames duplicati-20190222T113831Z.dlist.zip.aes to duplicati-20190222T113832Z.dlist.zip.aes and then 4 seconds later tries to delete the file (1Z) that it just renamed. Once it renames the file it should know the old file no longer exists? Then again this is the only place the “Retrying…” line shows up in the log for either job, which seems like it could indicate a communication error.

2019-02-22 04:27:10 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-20190222T113831Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:16 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Retrying: duplicati-20190222T113831Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:26 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend     event: Put - Rename: duplicati-20190222T113831Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:26 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Rename: duplicati-20190222T113832Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:26 -08 - [Information-Duplicati.Library.Main.Operation.Common.BackendHandler-RenameRemoteTargetFile]: Renaming "duplicati-20190222T113831Z.dlist.zip.aes" to "duplicati-20190222T113832Z.dlist.zip.aes"
2019-02-22 04:27:26 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Started: duplicati-20190222T113832Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:28 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Put - Completed: duplicati-20190222T113832Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:28 -08 - [Information-Duplicati.Library.Main.Operation.DeleteHandler-DeleteRemoteFileset]: Deleting 1 remote fileset(s) ...
2019-02-22 04:27:30 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Delete - Started: duplicati-20190218T143903Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:30 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Delete - Completed: duplicati-20190218T143903Z.dlist.zip.aes (2.70 KB)
2019-02-22 04:27:30 -08 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Delete - Started: duplicati-20190222T113831Z.dlist.zip.aes ()
2019-02-22 04:27:30 -08 - [Warning-Duplicati.Library.Main.BackendManager-DeleteRemoteFileFailed]: Delete operation failed for duplicati-20190222T113831Z.dlist.zip.aes with FileNotF
ound, listing contents

I’ll keep the job(s) running and see if anything else happens.

Edit to add: the file “duplicati-20190222T113832Z.dlist.zip.aes” is present in my dropbox with a size of 2.7K.