Hi,
you can perform the following check:
1) check the stack cabling with "show stack health": it should say "Resilient". If not, check your cabling
2) save the config on-box with "wr mem"
3) take an off-box copy of the config with "copy run tftp address x.x.x.x filename backup_stack.cfg" where x.x.x.x is the ip of a machine with a tftp client installed and running (eg tftpd32)
4) check auto-unit-replacement with "show stack auto-unit-replacement", it should indicate all configs are saved
5) unplug the base unit, unit 2 should become temp base
6) install the new switch, but leave the base switch on the back to the left (non-base unit)
7) link all stacking cables and boot the switch

as soon as the switch is up and running, verify the stack with "show stack health"
9) If the stack is fully formed, move the "base" selector on the back of unit 1 to base and reboot the stack
10) verify correct configuration of the stack after boot.
If you you have the luxury of downtime do the following.
1) take an off-box copy of the config with "copy run tftp address x.x.x.x filename backup_stack.cfg" where x.x.x.x is the ip of a machine with a tftp client installed and running (eg tftpd32)
2) reset the stack with "restore factory -y", the stack reboots
3) during boot, unplug the power cables
4) replace the base unit and boot the stack
5) put the backup back in