Backpacking on a mountain bike can be a lot of fun if done right. You can cover lots of distance and it often puts you out on remote trails you might not get to ride on during a single day trip. When I said mention the caveat “if done right” that should throw up a flag that it can be miserable if you aren’t prepared.
TwentyNineInches has a good article up on a backpacking bike build they did using Lynskey’s American made titanium M2923 hardtail frame. Hardtails are often better for backpacking bikes because they are more simple to do repairs on and lightweight. Check out the full article to see how they were able to build up a bike that works great for daily XC rides and can be converted into a backpackers dream.