When a prisoner is confined by virtue of any process directed to the sheriff, and which shall require to be returned to the court whence it issued, such sheriff shall keep a copy of the same, together with the returns made thereon, which copy, duly certified by such sheriff, shall be prima facie evidence of his right to retain such prisoner in custody.
R.L. 1910, § 4599.