Enable/disable Time Machine depending on network connection type I've not got a great Wi-Fi setup here at home and it sometimes results in failed Time Machine backups.  Is there a way of specifying that Time Machine only backs up under certain circumstances - i.e. Ethernet connection is active...?
This AppleScript will check if the Ethernet connection is active, and then run a Time Machine backup if so.

First, disable Time Machine in System Preferences. The below method will run it automatically.

While connected to Ethernet, you will need to run one command manually to confirm which interface Ethernet is assigned to. Run this command:

ifconfig


It should output a screen full of information. What you are looking for is a section labeled en with a number after it, and whose last line is status: active, like this:

en1: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
    options=b&lt;RXCSUM,TXCSUM,VLAN_HWTAGGING&gt;
    ether 00:25:00:ef:30:3c 
    inet6 fe80::225:ff:feef:303c%en1 prefixlen 64 scopeid 0x5 
    inet 192.168.1.68 netmask 0xffffff00 broadcast 192.168.1.255
    media: autoselect (100baseTX &lt;full-duplex&gt;)
    status: active


Note the number next to en at the beginning - this is the interface that your Ethernet connection is running on. In the script below, where it says en9, replace 9 with the number from above. (If you have a Mac Pro, it will most likely be en0 or en1. Otherwise, it will likely be en0.)

if (do shell script "ifconfig en9 | awk '/inet/ {print $2}'") is not equal to "" then
    do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper &amp;"
end if


Save this as EthernetTimeMachine.scpt into your home folder (/Users/&lt;yourusername&gt;/).

Next open up Terminal and type the following command:

pico ~/crontab


This will open up a text editor to allow you to schedule this script to run on an hourly basis, just like Time Machine does by default. Paste this line:

@hourly osascript ~/&lt;yourusername&gt;/EthernetTimeMachine.scpt


Press control+X then type y and press return to save and exit.

To disable it, go back into Terminal, again use the command:

pico ~/crontab


Then delete the line you added above and use the same steps to save and exit.