I run telecom equipment like this straight off of DC from time to time.
Note that the wattage rating of a commercial UPS doesn't indicate how long it will last; it indicates how much instantaneous power it can deliver based on the size of the inverter-charger (the unit that does the AC<-->DC conversion). So a "1000w" device may last for 15 minutes with a small onboard battery, or it may last for a day with a large bank (we're talking over a thousand pounds) of attached batteries. What you are looking for is the battery *capacity*, typically measured in watt-hours or a combination of amp-hours and nominal voltage.
Regardless -- a commercial UPS will waste a huge amount of its available energy running the inverter-charger circuitry. Just using some real-world numbers from equipment I have: one of my 1000w inverters will draw somewhere around 10w just as a tax for energizing the circuitry, even before you put any load on it. So if you have 12w of load, that means up to 45% of the power draw is being wasted just running the inverter circuitry. They really are designed to integrate easily with existing loads, provide bridge power until a backup supply kicks in, or provide time to gracefully shut down the equipment. They aren't optimized to run your loads as long as possible.
If your goal is extended, efficient runtime for DC-only loads, you should look into some of the portable power packs available on the market (goal zero, etc). These typically consist of a battery, some control circuitry, a few DC power outputs, a solar input, perhaps an onboard charger for recharging from wall (AC) power, and perhaps a power inverter for producing AC power from the battery.
For maximum efficiency, you'd want to use one of the straight DC power outputs, and keep the inverter turned off. Powering direct from DC eliminates the conversion losses in going from DC (battery) to AC (through power inverter) and then back to DC (through equipment power supply).
I don't know what voltage the specific gear in your photo requires. It's probably either 12vdc, 5vdc, or 24vdc. You can check on the back, it will usually say what its voltage requirements are.
You can purchase small, inexpensive DC-DC "buck converters" to convert from the nominal system voltage of your power source (most likely 12vdc) to the voltage required by the equipment, if required. If it's 12vdc, you're good, no converter required. If it's 5vdc or 24vdc, you will need a buck converter. These converters can be found for <$15.
You'll need to buy a few adapters to get the DC power into the equipment. You will need to determine the size of the barrel connector that plugs into the back of the equipment, and you'll need to buy your own compatibly-sized barrel connector that connects to the DC power output.
You'll most likely end up getting the DC power out of the power source via an automotive 12v "cigarette lighter" socket, then splicing it into a DC-DC buck converter if needed to get the proper voltage, then splicing into a barrel connector adapter to get it into the equipment.
It definitely can be done, and for the right application it makes a lot of sense. It's a bit more complex than just using a UPS, but it is what you want if your goal is extended runtime.
I have a 100ah 12v battery (about 60lbs), and even with keeping the battery above 50% to prolong its lifespan, that gives me ~600wh of usable capacity, which could run a 12w load for just over 2 days. Your runtime increases substantially when you don't waste the majority of the power running an oversized inverter and suffering double-conversion losses.