How to get correct data source UID in my dashboard's JSON file while exporting it on a different system?

This related answer Should provisioned dashboards have datasource uids? - #8 by davidkuda suggests to add the datasource: DatasourceNameHere to prevent dealing with UIDs.