Fail-safe power with Nano

I need to keep a Nano powered in the event of a power failure. It seems to me that this might be done via the 5V pin but in any case has anyone a suggestion as to how I should approach the problem? There's no diagram or sketch to submit yet.