Buckle up:
500 Watts for 1 hour is 500 Watt-hours (Wh).
2 hours would be 1 kWh.
12 hours, 6 kWh.
6 kWh is 6,000 Wh.
Let’s say your UPS is 90% efficient. You need 6,000 Wh / 0.90 = 6,667 Wh of battery energy.
Most UPS systems in that size range will have 48 Volt or 96 Volt busses.
Let’s stick with 48 V
6,667 Wh / 48 Volts = 139 Amp-hours at 48 Volts.
But we need to account for battery type. Lead Acid (AGM in most UPSs) should not be taken below 50% charge, so you need 278 Ah at 48 Volts.
If the batteries are LiFePO4, then call it 90% discharge, so you need 155 Ah at 48 Volts.
Batteries in series add voltage, but not amp-hours. So the UPS needs 4 batteries in series per string to make 48 Volts, and multiple parallel strings to reach the required amp-hours. For example, if you used 100 Ah AGM batteries, you would need three parallel strings (12 batteries total) to get 300 Ah at 48 Volts. That is 700 pounds of batteries!
Sanity Check — Your current APC BackUPS 1500 has (2) 7.2 Ah batteries in series for a 24 Volt bus. You get about 20 minutes of runtime at 500 Watts. That is about 12 pounds of batteries.
So in theory (3) backUPS 1500s per one hour, 36 of them for 12 hours, or a single BackUPS 1500 with (72) 7.2 Ah batteries. But all of those small batteries at high discharge rate suffer large capacity loss, so your theoretical cabinet would need more like 100 of them.
Perspective: You draw less than 500 watts so could go smaller and still likely hit your 12 hour target. Say the sustained average is 250 W. You halve the capacity requirement. It is still a very large battery requirement, but workable. A LiFePO4 setup that can do 75 Ah at 48 V would work and only weigh 150 pounds or so.
I think you are looking at a $1500 to $3000 investment in a power bank, depending on brand.
For UPS style (AGM), using CyberPower (inexpensive) as an example for 12 hours at 250 W, you are looking at a $1000 UPS and (6) $1000 battery cabinets. So $7000 and batteries that have a 3-5 year lifespan.
Not the answer you are looking for.