Sump pump automated battery backup
Another answer by Fresh Codemonger suggests having two pumps, one on regular power and the other on your inverter.

I would like to suggest a similar option that I think is more efficient.

As the other answer says, you should have a second pump. However, instead of connecting it to your inverter, your second pump should be one that is designed to run directly from 12VDC and have a battery charge controller. That way, the pump itself maintains the battery charge and automatically turns on when needed. That removes the need for the inverter, resulting in a simpler and more energy-efficient setup.

There are also a number of sump pump companies that actually make a 2-in-1 pump which has both a 120VAC pump and a 12VDC pump in the same unit. It automatically switches between them as needed.