1. Bring up a cluster with 2 indexer nodes. A single bucket in the cluster will suffice.
2. Create an index with name "index1" on some filed "filed1", with num_replica = 1. It will create one main index and one replica index, one on each node.
3. Take a backup.
4. Drop index1.
5. Create an index with name "index1" on some other field "field2", with num_replica = 1. It will create one main index and one replica index, one on each node.
6. Trigger restore of the backup taken in step 3. During restore, old index on "filed1" will get renamed to index1_0. It will used same index inst id as it had before dropping. This restore will succeed - as expected.
7. Trigger the restore of the same backup again. Here, during restore, this index on "filed1" will not be skipped, but it will be treated as restore candidate with new name index1_1 - this is not expected. It will be attempted for restore with same instance id as that of earlier. Also note that this index index1_1 will get a different defn id during restore.