Move restore functionality into khepri package