If you have a basement, you should not only have a primary sump pump but also a battery backup just in case the main one fails. Whether that failure occurs due to a power outage or a mechanical problem, a battery-powered backup can help keep your basement clear of water.
Many battery backup systems have an alarm feature that will notify you that the main pump has failed. It will then take over until it senses that the primary pump is once again working. Several of them can test themselves to make sure they are operating properly. This will also help extend its lifespan. When a pump sits in water without running, it can accumulate scale and corrosion and wind up failing prematurely. When the pump runs, however, this material will be broken up so that it can continue to operate.
If your main pump fails due to a mechanical problem, you need to do what you can to have it repaired or replaced as soon as possible. While the backup system is reliable and can move a great deal of water, its battery will still eventually fail.