Perhaps a change of diet is in order? For many dogs, the premium foods work better because there is less bulk and hopefully, less gas. That depends on the individual dog, though. Despite the price per bag, premium dog food isn't really more expensive than the standard supermarket food because you feed that much less--and there's less to scoop at the other end, too. That also makes these foods better for backpacking. If he's already on premium food, try another kind to see if it works better. Ask your vet for suggestions.

If you're changing the dog's diet, do it gradually--start with maybe 1/4 cup of new food mixed with the old, increasing the proportion of the new over about 10 days. With my dog, when he's had reactions to food, it has taken about 2 months on the new food before he starts upchucking it. If I were going to change his diet now (which I won't, because he's doing fine), I'd do it several months before a backpacking trip.
_________________________
May your trails be crooked, winding, lonesome, dangerous, leading to the most amazing view--E. Abbey