6hours sustained is absurdly long, if it were a 300watt load the UPS would need a battery-bank with 150AH/12V or 125AH/24V.
the battery alone at that size would cost you no less than $1500 -
http://www.lithiumion-batteries.com/products/12v-150ah-lithium-ion-battery/
the best compromise, is a 3KVA generator and a fairly cheap but reputable UPS that could sustain a 2KVA load for at least 5minutes (this would mean an average of 35mins for a 300W load).
the power sizes are just an example, a good rule is having 2 times your entire circuit's maximum draw or you'd fry the UPS's inverter.
the generator must be at least 30% larger than your maximum load otherwise you could choke it, take note that a PC is an inductive load.
this is what a diesel generator's fuel efficiency chart would produce.
[30% efficiency conversion @ hour]
1L diesel / hour = 2,988 Watts / hour
0.1L diesel / hour = 299 Watts / hour
0.01L diesel / hour = 30 Watts / hour
0.001L diesel / hour = 3 Watts / hour
i researched it comparing it to my local electricity cost, it barely breaks even, not accounting investment cost which means its impractical as an alternative to the grid.
PS: 30% efficiency is average efficiency of a typical diesel generator, only the ultra-long stroke special duty diesel engine can reach upwards of 60% efficiency.
a turbo-charged and fine-tuned middle-end diesel engine averages at 45%, the most efficient diesel car engine is still stuck at 50%.
i used diesel fuel's energy content as means to get the power output, gasoline is less efficient.
better yet grab a laptop with high battery life, macbook air i think lasts 7hours on light surfing.