I am interested in this topic. Doing this thing right now. It seems that modifying the locations-*.config files directly is not enough.
Also, doing manual import/export or export sites csv files results into inconsistent view of current sites. Anyone has an answer to this?
As Francesco metnioned modify the locations-*.config file should be enough. You do not need to restart the CAS to take in place this new configuration. https://www.dynatrace.com/support/doc/nam/rum-console-and-configuration/rum-console-home/settings-me...
What you could try is just to add a single new location, to verify that the format is right and well imported. Once this is confirmed, proceed to add all the other locations.
The other option that you have, instead of using the locations-<yourname>.config file, is to import a JSON or YAML file with the format showed in the link above.
Tried to remove a site form the location*.config file. Waited 10 minutes and still show up. THought there was a CLI you can run to have the CAS reread the location files? Just don't remember what it is?