  The Lanczos process constructs a sequence of orthonormal vectors v_m spanning
a nested sequence of Krylov subspaces generated by a hermitian matrix A and
some starting vector b. In this paper we show how to cheaply recover a
secondary Lanczos process starting at an arbitrary Lanczos vector v_m. This
secondary process is then used to efficiently obtain computable error estimates
and error bounds for the Lanczos approximations to the action of a rational
matrix function on a vector. This includes, as a special case, the Lanczos
approximation to the solution of a linear system Ax = b. Our approach uses the
relation between the Lanczos process and quadrature as developed by Golub and
Meurant. It is different from methods known so far because of its use of the
secondary Lanczos process. With our approach, it is now in particular possible
to efficiently obtain {\em upper bounds} for the error in the {\em 2-norm},
provided a lower bound on the smallest eigenvalue of $A$ is known. This holds
in particular for a large class of rational matrix functions including best
rational approximations to the inverse square root and the sign function. We
compare our approach to other existing error estimates and bounds known from
the literature and include results of several numerical experiments.
