Two Time Capsules in one network, Macbook connects to the slower one when backing up I have two time capsules. They are connected via an ethernet cable and are part of the same wifi network. My devices connect to the one which has the better signal.

The problem is that my Macbook Pro always connects directly to the one where I store my Time machine backups when backing up (every hour). It happens even in cases where the signal is pretty bad and normally the other capsule would be used.

Current behavior

Macbook connects to tc2 when backup is in progress even though tc1 is closer and tc2 is in the same network:

                    [Macbook]............(wifi)..........................
                                                                        |
   [tc1]                                                              [tc2]


Desired behavior

Macbook connects to tc1, since it's closer, and runs the backup through it:

      .....(wifi)....[Macbook]
      |                                               
   [tc1]........................(ethernet)...........................[tc2]


Is there a way to tell Time machine to always use the Time Capsule wich has the better signal?
You don't explicitly state it, but is one of the APs extending the other, or are they both separate network IDs?

If they are participating in what used to be called a WDS extended network, then it's tricky to tell it which one to use.  But if you have them operating separate SSIDs, then you can simply not store the password to the one that is furthest away and allow the macbook to not even have a choice.

If you already have the 2 routers connected over cable, then there is absolutely no need for them to broadcast the same SSID other than for neatness.  Usually when you do that, it it because one it extending the range of the other by repeating the signal.  This is utterly redundant in your scenario, and you are far better off forcing any traffic that enters the network on Router A to route over ethernet to Router B if it is required.

Having a repeated wireless means you have 2 possible identical access points to connect to and having it potentially connect to the wrong one, and even if it connects to the right one, it will still just subsequently pass it back to the other one over Wifi thus negating the denefit of the lovely wired link you have.  It won't dump that traffic onto the local wired LAN to traverse over to the other router.  WDS is for when you can't link via a cable.

There are other considerations:

Your links speed to one AP may be faster than to another, but that doesn't consider (or even tell) what the link speed "back to base" is.  Imagine this.  You sit 30 metres from 1 wifi AP, and 70 from another, each of you in a straight line.  Your strongest signal is clearly from the one 30 meters away.  However your best connection may be to do the 70 meter link to the furthest point instead, as it will be closer and likely faster than going 30 meters in one direction to what appears to be the best conection, which then needs to go 100 meteres back the other way to complete the route.

Also, don't go thinking 300Mb wireless is faster than 100Mb wired.  It's not.  The speeds shown are for total bandwidth speeds, not usable bandwidth.  Wifi has considerable overhead that ethernet does not, including extended packet information for encrypted packets and associated handshaking etc etc that a wired LAN link will not have.