Add Your Own Battery Backup System To A Raspberry Pi Lifehacker Australia The battery backup here uses an inexpensive custom circuit that automatically powers down the Pi when it loses power.
Read more here:
Add Your Own Battery Backup System To A Raspberry Pi – Lifehacker Australia