GDrive data restore fail - constraint failed UNIQUE constraint failed: Remotevolume.Name, Remotevolume.State

Hi,

Hoping someone can help me please. Not used Duplicati for years but was a keen user back in 2017 and even contributed to the project to show my appreciation.

Years later in the present day, my NAS drive failed and i need to restore direct from GDrive. Two other recoveries worked as planned but the third fails with the below and despite looking for others with similar issues, I can only find threads reporting backup issues, not restore.

constraint failed UNIQUE constraint failed: Remotevolume.Name, Remotevolume.State

  • 2025-01-02 13:47:21 +00 - [Error-Duplicati.Library.Main.Operation.FilelistProcessor-ExtraRemoteFiles]: Found 9580 remote files that are not recorded in local storage, please run repair
  • 2025-01-02 13:47:21 +00 - [Error-Duplicati.Library.Main.Controller-FailedOperation]: The operation Restore has failed with error: Found 9580 remote files that are not recorded in local storage, please run repair RemoteListVerificationException: Found 9580 remote files that are not recorded in local storage, please run repair

Any help with this would be amazing - lots of memories unable to restore.

Thanks

How did you do the restore? “Direct restore from backup files”, using some old database, etc.?

What Duplicati version? What OS? If GUI, at what point does the error pop up, and how are the detailed messages related to the error above them, which seems to have very different format?

RecoveryTool can work when normal way won’t, but isn’t the first thing to try.

has the ability to have multiple files with same name, which might lead to:

but it’s not clear what path yours took. First need to find out what you ran.

log_files.zip (2.5 KB)

Hi ts678, thanks for taking the time to respond!

So, here’s the story thus far.

About 2017 I used Win8 client and the latest Duplicati at the time, utilising the webui to backup directly to GDrive. Not sure what version of Duplicati was used but it was 2017.

Today, for the restore I am using Win11 and Duplicati version 2.1.0.2_beta_2024-11-29, restoring using the webui.

Restore is as basic as it gets, using webui, I link up the restore procedure directly to GDrive to restore to an empty HDD locally on the Win11 client. This procedure worked for two other restores, this is the only one that is failing.

When I enter all the above info, it goes off and starts the restore:

Listing backup dates
Recreating Database
Verifying remote data

The restore quicky fails with constraint failed UNIQUE constraint failed: Remotevolume.Name, Remotevolume.State

Operation: Repair failed and then Operation: Restore failed

Interesting what you say about duplicate files in GDrive, could be the reason why it quicky fails, well I’d say it’s a quick fail with the delays in reading Gdrive etc, which isn’t as fast as locally.

I have attached the detailed logs. Can’t see anything obvious, though.

Many thanks

image

Did this fail after Select files, Restore options, or elsewhere?

If you mean you got all the way to screen 4 past Restore button, your test_1.zip log only shows remote folder list and the UNIQUE error, which seems to be on its way to Select files screen.

If you get pastRestore button, it may spend awhile in Building partial temporary database.

Can you give context for what was done for each? Also, where are they in a Direct restore?
Job logs are easier to find when one creates a job (at least for me). Maybe a failure offers logs?

Your logs show failures after zero file downloads, so somehow directory listing may be doing this.

For test, I duplicated dlist, dblock, and dindex files in a small backup, but got through full Restore.

Maybe the developer will have an idea, but meanwhile you can see if I understood what you tried.

EDIT 1:

(deleted first part here)

Second log complaining about file difference is something I’m not expecting in a Direct restore.

EDIT 2:

I made a new job with dummy Source just so I can Recreate a DB and see if I can make that fail.
It became clear from DB that my copies of files had not copied their status of made-by-Duplicati, making them invisible. To counter that, I got an AuthID for a full access login, and now I can get:

Job → Show log → Remote just did list. Job → Show log → Complete log is like log_file_1.txt.

“Direct restore”, with same AuthID, Restore on screen 4 gets the error but not extra remote files.

EDIT 3:

Assuming the UNIQUE complaint is from duplicate files, one question is how to find them. A way:

C:\>dir "C:\Users\Me\My Drive\Duplicati Backups\test 2" | findstr "("
01/02/2025  04:25 PM               649 duplicati-20240125T174344Z (1).dlist.zip
01/02/2025  04:29 PM               696 duplicati-b2f024c9efdfe45e8ba04825d77456469 (1).dblock.zip
01/02/2025  04:31 PM               606 duplicati-i788b46f113164098a5ed751033dcd9ec (1).dindex.zip

because Google Drive seems to rename duplicate files because they aren’t allowed on Windows.

You could also try File Explorer, sort by Name, and scan (because the (1) will make name longer which might make it jut out to the right compared to the others, assuming the font will cooperate).

My best guess is that Google Drive has multiple files with the same name? That would really trip up Duplicati, but is not an issue for Google Drive, as it has a unique ID for each item.

That ability is certainly well proven in tests. I even had a live log at Profiling with Advanced option profile-all-database-queries on, and could see it INSERT the list result until it hit the dup planted by me via the Google Drive GUI. This is another way to see if there are any same names.

Advantage of the way I had posted is (if it works for user) it will locate all of the duplicated names.

I checked the code, and there are some guards against duplicates, but the LIST operation will actually return duplicated filenames, which would trigger the error.

@MarcB Did you progress on this?