Car stereo wired to computer power supply with backup battery to keep memory
You should probably use a 12V battery, and a special battery charger.

If you connected the 12V battery via 2-3 diodes in series (depending on voltage drop), it should make the battery output ~11V, and the power supply will output 12V so no current will flow through the diodes unless there's no power connected. But you'll need to make sure you charge the battery up frequently.