Using two diodes as a simple power supply backup switch
The two diode arrangement is used a lot, not only for battery backup but also for other similar purposes (e.g. redundant power supply units).
Simple diodes have a voltage drop that may or may not be acceptable in your use case. The mitigation measures for the voltage drop include:

Using higher supply voltage (voltage drop of ~1V is bad in 5V circuit and becomes way less of a concern in 24V circuit)
Using Shottky diodes or germanium diodes (they have less voltage drop, like 0.2-0.5V vs 0.7-1.2v for silicon ones)
Using MOSFET-based &quot;ideal diode&quot; circuits that are more complex and expensive but can go as low as 0.02V drop.