make restore script more configurable