Is it an upgrade or move from one instance to the other?
Kentico media library consists of 2 parts
- the record in the database (with the unique key and any data)
- the file itself (on disk, in Azure storage, ...)
These two items need to match by path.
Are you also referencing it from content items which need to stay be intact?