How to automatically switch to backup outlet if power goes away?
simulate this circuit &ndash; Schematic created using CircuitLab
Figure 1. A relay transfer switch with supply 1 priority.
How it works:

If supply is present on L1/N1 then RLY1 is energised and the load is powered from L1/N1.
If supply is lost on L1/N1 then RLY1 is de-energised and the load is supplied from L2/N2.

The relay needs a 220/230 V coil and contacts capable of 10 A (a little safety margin).
This system would be quite suitable for a resistive load such as heaters or lamps.
With inductive loads - think of devices with coils such as motors and transformers - there is a problem. Inductance &quot;tries to keep the current going&quot; and this causes arcing on the contacts. The situation is much worse if the two supplies are significantly out of phase. In the worse case you might switch from one supply at peak positive to the other at peak negative and cause high currents to flow for some milliseconds. You'll need to assess whether you can tolerate this.
If you decide that it can then purchase a contactor (high power AC relay). Again 220/230 V coil, and changeover contacts rated at 20 to 30 A should give you good reliability. This is most likely to be a 3-phase device (three contacts) but you'll only use two.
Both supplies need to have the appropriate circuit-breaker protection.