restore and update index for whole dir