add database recovery after server crashes