Add database restoration function.