Overview:
When trying to migrate CLM content with custom lookup fields on any of the related records, the migration fails with an error: Copying of media file failed. This is followed by the field names and ids of the records that are failing.
Root Cause:
If the lookup in the source org references a record that does not exist in the destination org, it fails.
Example, if a lookup exists on the key message object to the CLM presentation object, the CLM presentation record being referenced needs to already exist in the destination org.
Solution:
This configuration should be avoided where possible. If it is not possible to avoid it, be sure that the records referenced in the lookups exist in the destination org before migrating.
Related Documentation:
CRM Help Documentation: Creating and Managing CLM Content