How to automatically make Mac shutdown after Time Machine Backup
I wanted to be able to leave an existing backup to complete, so my approach is a little different.

The backupd process seems only to be running whilst a backup is underway (and for a minute or two afterwards, from what I've observed) so I logged in as root (so that I can (a) see all users' process and (b) trigger a shutdown) and then polled for the process to finish before shutting down.  So:

sudo -s


and enter your password to become root, then:

while ( ps -ef | grep 'backupd$' ); do echo "Still backing up..."; sleep 60; done; shutdown -h +1


to wait for backupd to finish and then shut down.  (I used shutdown -h +1 instead of shutdown -h now just to be over-cautious and give it an extra minute to tidy up or whatever before shutting down.)