Need suggestion on the selection of rechargeable battery
A small uninterruptable power supply can be made with a motorcycle or
automotive (or even a gel cell) 12V battery that will suit this need.  PicoUPS at Amazon.comPicoUPS.   The changeover when power fails is
automatic, as is the recovery when power returns.

More elaborate uninterruptible power supplies would also deliver AC
for other items (a telephone answering machine, for instance) while
delivering AC through the wall-wart to operate your router.

If you can get a power meter (Kill-a-Watt for instance), you may be surprised to find that your
router's nameplate power requirement is very conservative: it might only
take a fraction of the 12W that the adapter provides.   For this use,
the 'V-A' reading tells what the drain on a battery would be.

A battery alone will not handle the switchover, and will require charge
control, and won't give regulated output for your 12V appliance.  It
might work, but isn't ideal.