I agree with barry that the battery is potentially charged from 4.2V node. Depending on the battery type this might conflict with safety regulations.
Presumed that you don't need to cut-off the battery supply, you'll usually flip drain and source terminals.
But for a full assessment, battery type, main voltage supply range and minimal RAM supply must be known. As a generally comment, for battery and RTC backup only, I would try to come along with a passive diode switch.