Thanks for the response, but I need an industrial solution. It is not possible to mount a diode circuit at each connection point.@Naglya Put a diode on the wire, so that there is only current flowing from the batteries:
mUPS --------|<------- battery