Well - of course you can book a trip to Yosemite, but that's via bus and it's really YARTS and not an Amtrak California bus. Take your pick of campgrounds at Yosemite Valley, including Upper/Lower/North Pines, Camp 4, or the Valley backpackers' campground.
And of course that's your starting point for a real backpacking trip. You could either try to reserve ahead of time or wait in line to try and get a permit.
The hard part is finding a place where backpacking is actually allowed, if you're referring to primitive camping where you just set up a tent "wherever". Or at least where I've done it, it's strongly suggested not to clear an area that hasn't been used before.
Close to where I live, it's actually less than five miles from the Berkeley Amtrak station to both group campgrounds at Tilden Regional Park. They're not really individual campsites though. I heard it's $100, and doesn't make sense to reserve unless you're talking a large group of maybe 5-10 families.