It is true that STM32F030 RTC power supply is connect with VDD, do not have separate power, so if you connect battery to VDD, parts of digital circuit will use this battery power, and need to fine tune your code to get min power consumption to prolong the BAT energy.
Otherwise, use extern RTC chip, or change to another STM32 MCU with separate BAT supply.