  The production of $\psi(2S)$ mesons is studied in dimuon final states using
proton-lead collision data collected by the LHCb detector. The data sample
corresponds to an integrated luminosity of $1.6~\mathrm{nb}^{-1}$. The
nucleon-nucleon centre-of-mass energy of the proton-lead collisions is
$\sqrt{s_{NN}}=5~\mathrm{TeV}$. The measurement is performed using $\psi(2S)$
mesons with transverse momentum less than $14~\mathrm{GeV}/c$ and rapidity $y$
in the ranges $1.5<y<4.0$ and $-5.0<y<-2.5$ in the nucleon-nucleon
centre-of-mass system. The forward-backward production ratio and the nuclear
modification factor are determined for $\psi(2S)$ mesons. Using the production
cross-section results of $\psi(2S)$ and $J/\psi$ mesons from $b$-hadron decays,
the $b\bar{b}$ cross-section in pPb collisions at
$\sqrt{s_{NN}}=5~\mathrm{TeV}$ is obtained.
