I have mentioned my own experiences backpacking long distances which have always included a firearm. I speak from the reality of the trail.
A Glock 17 or 19 would be suitable weight-wise.
Still, a 17 ounce 38 beats them in both weight and size. Still has enough power, and can be kept ready in a pocket with your hand on the grip without the need to brandish, and can be fired from the pocket without jamming.
I am strong enough to carry a heavier weapon, but my backpack trips are not about beating myself up to prove that I can carry a more powerful weapon on the slim chance that I may need it. If I were backpacking in country where defense against large predators was a possibility, than my choice would change, as it did when I packed a six-inch 44mag.
As I said, in my 30+ years of backpacking, I have only had a couple times where I was glad to be armed, yet I never had to draw my weapon.
Instead, I have had great trips in the outdoors, traveling long distances with a great companion, and carrying what I consider to be the minimum of items needed to have a safe and comfortable trip.
I load my pack with everything I want to bring. Usually, when I finish, I heft it on to my shoulders, adjust the straps, and walk up and down the steps a few times. Then, I start pulling out things I don't need.
Backpacking newbies often bring too much stuff, and as they mature in their sport, they learn what to leave behind.
Some veteran backpackers are adherents of the ultra-light movement, trimming their load down to 20lbs where everybody around them carries 40.
As in all self defense and weapon/caliber discussions on these sites, everybody has their opinion they are sure of and which causes them to dismiss the choices of others. I won't dismiss your choices, But I doubt I will see you on day three of a long distance backpack trip after my pal and I top the 15th ridge we have crossed. By the way, carrying a heavy pack downhill is as hard, or harder than carrying it up the other side.
The danger areas in backpack trips are road crossings and trailheads...anywhere that isn't too far for a loser to walk to.
Oh, and thanks for pointing out my spelling error...I never use spell check, and occasionally, one gets past.