Sonora: Population 4,610; elevation 1,796 feet (547 meters)
Jamestown: Population 3,017; elevation 1,427 feet (435 meters)
Sonora and Jamestown are former mining towns a few miles apart in the foothills along Highway 49, California's aptly numbered gold rush highway. Both have historic downtown districts and vintage buildings (and in the case of Jamestown, trains) that have served as sets or exteriors in various films and tv shows, including High Noon, Back to the Future III, Hidalgo, and hundreds of others.
Shopping & Supplies: Two full-sized grocery stores here, a Safeway and a SaveMart, plus several gas stations. Sonora's boutiquey gold rush district has the usual antiqueries, coffee shops, and tuxedo rentals, plus a bookstore, sporting goods, and - a sure sign of a fun town - multiple bail bondsmen.
Pro: Sonora has a handsome, bustling gold-rush-era downtown district that's an attraction of its own. Jamestown has one as well, shorter but more peaceful. (Sonora's is along Highway 49 and can get heavy automobile traffic - it starts the other side of the stoplight in the above photo.)
Con: It's a long drive to make twice a day, especially given one extremely serpentine section of Highway 120 you'll have to navigate. Sonora and Jamestown probably work better as bases for exploring the gold rush area than Yosemite.
Lodging TLDR: Reviews on the area's hotels are decidedly mixed, but the 1859 Historic National Hotel, Miner's Motel, Best Western Plus Sonora Oaks, and Gunn House Hotel all score 80% or better on TripAdvisor, and the Barretta Gardens Inn tops 95%.
1859 Historic National Hotel
9 guest rooms, $140 weekdays and some weekends; breakfast buffet included; restaurant & saloon onsite; built in 1859
Americas Best Value Inn & Suites - Royal Carriage
Queen guest rooms and kitchenette-equipped cottages, $70 - $150; free Internet, free continental breakfast
Country Inn Sonora
63 guest rooms; free Internet and continental breakfast; outdoor pool; $60 - $375
8 guest rooms, $90 - $200 (see rates page); free breakfast; restaurant onsite
Jamestown Railtown Motel
20 guest rooms, summer rates $80 - $100; outdoor pool; some pets allowed ($10 fee)
18 guest rooms; outdoor pool; some pets allowed ($10 fee)
Victorian Gold Bed & Breakfast
8 guest rooms, $110 - $185; free Internet; some pets welcome; built 1890s
Barretta Gardens Inn Bed & Breakfast
8 non-smoking guest rooms, all with private baths, $110 - $390 (see rates page); restored Victorian farmhouse built in 1903
Best Western Plus Sonora Oaks
101 guest rooms & 17 suites, summer rates $125 - $200; free Internet and continental breakfast; outdoor pool; some pets allowed ($25 fee)
double/queen/king rooms and suites, summer rates $80 - $150; free Internet and breakfast
42 guest rooms, some smoking, summer rates $50 - $90; free Internet and breakfast
Gunn House Hotel
19th-century hotel with 12 guest rooms, $80 - $115 per night
Inns of California
Two double/two queen/one king room types, summer rates $80 - $180; free Internet and breakfast; pets allowed ($100 deposit, $25 fee)
Sonora Aladdin Motor Inn
Two queen or one king room types, $80 - $145 (see rates page); free Internet and breakfast; pets allowed in some rooms