Hi,
Safe or not might be based on your environment, some compatibility issue might occur if you have old software or driver, so those will cause software or driver unavailable or in-place upgrade failure. It has little to do with whether it is a file server or not.
We could refer the link below to consider whether a migration or in-place upgrade more suitable for your environment.
Windows Server: Migrations vs. In-Place Upgrades
If you prefer to have an in-place upgrade, we could refer to Performing an in place upgrade of Server 2008 R2 to Server 2012 R2
If not, try to clean installation and migrate all data to new Windows Server 2012R2. Make sure you have backup all of data before perform any actions.
Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Bests,
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html