Appeal from a judgment of the County Court of Montgomery County (Tomlinson, J.), rendered August 4, 1998, convicting defendant upon his plea of guilty of the crime of attempted burglary in the third degree.
Based upon a plea bargain which included a waiver of the right to appeal, defendant, who was originally charged with burglary in the third degree, pleaded guilty to attempted burglary in the third degree. He was sentenced in accordance with the plea bargain to four months in jail and five years’ probation. On appeal defendant contends that his waiver of the right to appeal should not be enforced and that his sentence is harsh and excessive.
Not having moved to withdraw his plea or vacate the judgment of conviction, defendant has failed to preserve his claim regarding the validity of his waiver of the right to appeal (see, People v Dopp, 261 AD2d 715, 716). In any event, contrary to defendant’s claim, the record demonstrates that his waiver was knowing and voluntary. County Court explained that, as part of the disposition, defendant would be giving up the right to have an appellate court review any of the proceedings in this case and that the sentence imposed would be final. Defendant, who was represented by counsel, acknowledged his understanding of the waiver.
The waiver of the right to appeal being knowing and voluntary, defendant’s claim that the sentence is harsh and excessive has not been preserved for review (see, People v Leibach, 249 AD2d 636, lv denied 92 NY2d 880). Beyond that, there is no merit to defendant’s claim. The probationary period is not excessive and the restriction on his possession or use of alcohol as a condition of probation is reasonable in light of defendant’s admission that he was under the influence of alcohol when he committed the instant crime and when he had -previous *802contacts with law enforcement as a juvenile. There is no basis to disturb the sentence.
Cardona, P. J., Mercure, Crew III and Graffeo, JJ., concur. Ordered that the judgment is affirmed.