Diesel generators (gensets) are commonly used to provide a reliable source of electricity in off-grid locations. Operating a genset is expensive both in terms of fuel and carbon footprint. Because genset efficiency increases with offered load, this expense can be reduced by using a storage battery to ensure that a genset always runs at full load, charging and discharging the battery as necessary. However, the cost of batteries requires us to size them parsimoniously and operate them efficiently. We, therefore, study the problem of provisioning and optimally managing a battery in a hybrid batterygenset system. To aid in sizing a battery, we analytically study the trade-off between battery size and carbon footprint. We also formulate the optimal scheduling of battery charging and discharging as a mixed-integer program, proving that it is NP-hard. We then propose a heuristic online battery scheduling scheme that we call alternate scheduling and prove that it has a competitive ratio of k1G/C+k2Tu : k1+k2Tu with respect to the offline optimal scheduling, where G is the genset capacity, C is the battery charging rate, k1, k2 are genset-specific constants, and Tu is the duration of a time step. We numerically demonstrate that alternate scheduling is near-optimal for four selected industrial loads.