You could use the REST API to download each data source, update the XML, and republish. Personally, I would try three simpler options first.
Option 1: Create a DNS alias so that the alias is the old server name and it points to the new server.
Option 2: Change the hosts file on Tableau Server to do the same thing as option 1.
Option 3: In Server, click on the Data Sources tab. Filter to show only data sources that use the old connection. Select them, and then under Actions, click Edit Connection. This will allow you to bulk update the connection string. See Edit Connections on Tableau Server - Tableau