Assume first question is: Suggest a circuit to connect both a primary and a backup DC voltage supply to a load with preference to the primary? The answer depends on the voltages and reverse current characteristics of the two supplies. Probably the easiest way is choose the AC-mains-fed primary supply output to be at a slightly higher voltage than the battery-fed backup supply.
If either supply can't tolerate having the other supply back feed voltage onto the supply that is lower or off, then place a diode in series with the intolerant (possibly both) supply's positive output with the two diode cathodes connected together and to the load, while directly connecting the grounds of the supplies and load together. This is commonly called a diode-OR power-sharing circuit, because power comes from supply A OR B depending on which has higher voltage output. Other fancier ways exist to do similar with less power loss by using FET switches to steer the current, some of which are described in the linked question/answer.
Assume your second question is: Can I combine two batteries of the same voltage in parallel for extra capacity, both for charging and discharging? The short answer is that you can safely connect two battery packs with the same chemistry and voltage in parallel if you first charge them independently to the same final voltage before the initial connection. After the parallel connection, they will operate as one larger battery for both charging and discharging, and the resulting capacity is the sum of the two individual capacities (which do NOT need to be identical). Read some relevant Q&A on such systems. However, if the battery packs contain an internal Battery Management System (protection electronics) like many modern Lithium-based bulk storage battery packs, then first consult the battery instructions for details if parallel connections are supported. Do not ever connect different battery chemistries in parallel, even if they are same voltage range (e.g. a lead-acid 12V battery in parallel with a 12V LiFePO4 battery is not going to work well, because the term "12V battery" actually describes a range of operating voltages that is not identical between chemistries, and no battery charges or discharges at just 12.0V).
You mentioned you have a 24V power source from AC-mains full-time connected to a 24V battery pack you made. Just take care that if the power source is not intended as a 24V battery charger, but rather is a constant-voltage AC-DC supply, that you adjust the output voltage to a proper "float charge" for your battery chemistry, which will not be 24.0V. And please be aware when building your own series cell battery pack, that you should appropriately match cell capacities and balance the cells as needed.