restore ready and load docs from database