If you have city water and not a pump you could look into Water Powered Backup Sump Pump.
Your battery will have an amp-hour rating. Your 12v pump will have an amp rating (it might be milliamps, amps/1000). When you divide the amp-hours of the battery by the amps of the pump, you get the number of hours the pump will run before the battery goes dead. An old battery will have fewer hours than a new one.
You can reduce the amps required by the pump by making sure the hose outlet is as close to the ground as possible. That means don’t let the outlet dangle above the ground. Make sure the hose is long enough to touch the ground. This will reduce the actual amps required to run the pump.
If you happen to live on a hill and can place the hose outlet at an elevation below the inlet, the water will continue to siphon out even after the battery goes dead. It will not restart without the pump, though, if the siphon vacuum is ever broken when the inlet hose is no longer submerged.