How long will an inverter battery last?

How to maintain your inverter battery, increase it’s working lifespan and ensure that it functions properly when the mains supply has failed