How can I detect and remount my time machine sparsebundle?
Nowadays you can point Time Machine directly at a network share and it should handle this for you automatically. Maybe your question relates to an older version of macOS.