Hope for the best and prepare for the worst.

Meaning: We should all be optimistic and positive, but at the same time we should be prepared to face trouble and difficulties whenever they arise.