Re: Battery Backup
You have to sense with a comparator or by other method when the external power is gone. To switch to the battery, you can use a MOSFET, for example.
If the battery is a lead-acid, then you can have your DC-DC connected to the battery all the time. The external source connects to the battery through a diode and is supposed to maintain the voltage across the battery constant at the charging level. When the power is gone there is no switching to be done, since the diode will turn off by itself and the battery begins to automatically source power to your DC-DC. (This is exactly how the battery works in a car: it is charging all the time while the engine is runnig, but when the engine stops the diodes in the alternator turn off and the battery supplies power to the radio, for example, without interruption.)
If you use another chemistry battery, the switching can be more complicated. Please post some details and we can come up with a schematic.