(c) Except as provided in section 6, the defendant shall, before any appeal under this section is allowed from a judgment of the superior court, a housing court, or a district court, rendered for the plaintiff for the possession of the land or tenements demanded in a case in which the plaintiff continues at the time of establishment of bond to seek to recover possession, give bond in a sum as the court orders, payable to the plaintiff, with sufficient surety or sureties approved by the court, or secured by cash or its equivalent deposited with the clerk, in a reasonable amount to be fixed by the court. In an appeal from a judgment of a district court the bond shall be conditioned to enter the action in the appellate division at the return day next after the appeal is taken. In an appeal from a judgment of the superior court or a housing court the bond filed shall be conditioned to enter the action in the appeals court. Appeals from judgments of the superior court or a housing court shall otherwise be governed by the Massachusetts Rules of Appellate Procedure. The bond shall also be conditioned to pay to the plaintiff, if final judgment is in plaintiff's favor, all rent accrued at the date of the bond, all intervening rent, and all damage and loss which the plaintiff may sustain by the withholding of possession of the land or tenements demanded and by any injury done thereto during the withholding, with all costs, until delivery of possession thereof to the plaintiff.