I replace the Nicad by removing the board and using a solder sucker (Radio Shack) and a soldering iron. Have not had a battery blow (yet). Then I solder in a new one. If you have the book on the mother board, it will tell you where to attach an external battery 9usually a lithium just a bit bigger than a 9V). It usually comes with a "pig tail" and a plug. Yes the jumper is moved to external AND THE OLD BATTERY IS STILL REMOVED. You can even use small diagonal cutters to snip it out without removing the mother board (depending upon location.)
Lastly you can get creative and buy a AA lithium sold by radio shack and a AA battery holder some wire and create an external back up battery. I do this for the parameter battery on turret servo drives on DAEWOO lathes. But I use 2 battery holders in parallel so a new battery can be installed each year and the old one removed without the loss of the parameters.
CMOS, follow the above advice in the prior posts.
George
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)