The production cross section of 30.92 GeV/c protons on carbon is measured by the NA61/SHINE spectrometer at the CERN Super Proton Synchrotron by means of beam attenuation in a copy (replica) of the 90-cm-long target of the T2K neutrino oscillation experiment. The employed method for direct production cross-section estimation minimizes model corrections for elastic and quasielastic interactions. The obtained production cross section is sigma(prod) = 227.6 +/- 0.8ostat(-3.2)(+1.9) osysTHORN - 0.8omodTHORN mb. It is in agreement with previous NA61/SHINE results obtained with a thin carbon target, while providing improved precision with a total fractional uncertainty of less than 2%. This direct measurement will reduce the uncertainty of the T2K neutrino flux prediction.