The security, if any, of the party appealing shall be bound for the judgment on the appeal; and, in case the security is compelled to pay off the debt or damages for which judgment is entered in the case, he shall have recourse only against the party for whom he became security.