Decays of $b$ hadrons into final states containing a $D^0$ meson and a muon are used to measure the $b\bar{b}$ production cross-section in proton-proton collisions at a centre-of-mass energy of 7 TeV at the LHC. In the pseudorapidity interval $2 < \eta < 6$ and integrated over all transverse momenta we find that the average cross-section to produce $b$-flavoured or $\bar{b}$-flavoured hadrons is ($75.3 \pm 5.4 \pm 13.0$) microbarns.