If you are knowledgeable with any scripting that can do DBus, you can do the following:
At the session bus, invoke CreateIndexer on interface org.bansheeproject.CollectionIndexer, invoke Index on the returned object path and await the IndexingComplete signal, then exit the wait and issue ShutDown. If you keep the mpris2 plugin active, you then can shutdown banshee gracefully by issuing Quit on the org.mpris.MediaPlayer2 interface.
As a side note, your cloud backup solution may also be eligible for DBus remote control so you can await its completion somehow and send the computer into sleep after the fact via the Suspend invocation on org.freedesktop.UPower at the system bus.