Fix offsite dirs restore

Close #504