The b-hadron production cross section is measured with the ATLAS detector in pp collisions at s=7TeV, using 3.3pb-1of integrated luminosity, collected during the 2010 LHC run. The b-hadrons are selected by partially reconstructing Dz.ast;+μ-X final states. Differential cross sections are measured as functions of the transverse momentum and pseudorapidity. The measured production cross section for a b-hadron with pT>9GeV and |n|<2.5 is 32.7±0.8(stat.)-6.8+4.5(syst.)μb, higher than the next-to-leading-order QCD predictions but consistent within the experimental and theoretical uncertainties.