Broken share URLs after extrenal storage change

it’s hard to judge from little details you shared… so I’m guessing a little.

If you create new external storage this results in new records in NC database (independent from the content)… so all shares pointing to the old location are broken… if you change existing storage all the shares should keep working…

There is a share renamer app to rename existing shares - you might learn from the code how the share are stored and update them… I remember discussions how different storages are defined in the DB in this forum but don’t find any quickly…

In general you can prepare for such scenario in advance - always use DNS record (or even better CNAME) - so you can easily change the IP of the real server without changing applications accessing it.