You need to make sure that (1) The backup MM is synchronized with the primary MM first (2) your MDs are pointing at the VRRP between the MM and Backup (3) the MM has to be upgraded first, and then the backup MM (4) the MDs are upgraded after both the MM and backup MM are upgraded successfully.
Make sure you do a backup flash of the primary MM before you start.