Getting this error during restore: `could not create unique index`

I had a similar issue. I describe how I fixed it in Can't restore due to corrupt indexes (with some clues on how to deal with corrupt indexes) - #3 by pfaffman, but it’s largely hand-waiving.