We have many maps, apps and other stuff in our federated and hosted portal.
We would like to un federated the server for a short time and then re federated it. Will all the items in MyContent survive?
If not - what will we lose?
If you do not perform the following step, ArcGIS Server services and hosted services published by portal users continue to run on the server.
If you no longer want ArcGIS Server services to be available to any application, log in to ArcGIS Server Manager and delete the services. Hosted services published by portal users are located in the Hosted folder.
The services should start working once you re-federate and add the hosting server.
Not sure about the apps though. You might like to refer ArcGIS Enterprise backups
Unfederating is rarely a good course of action to go through. Once you unfederate and re-federate, hosted services aren't considered hosted anymore and all of your service items have different IDs. Any other items that depend on the original service item IDs won't find them. Why are you looking into unfederating?
To second what JQuinn-esristaff mentioned, Esri went so far as to remove the option to remove a federated GIS server from the Portal settings GUI and move it to the admin API specifically to dissuade users from this action. For an Enterprise GIS with a large number of service items and users, when the item IDs change, a considerable amount of scripting gymnastics is required to put it all back together again. If you're running on VMs, take snapshots of the machines participating in ArcGIS Enterprise prior to taking this action so that you can just revert back.
Is there a recommended way to change the URL for a federating hosting server without unfederating and then refederating the server with the new load balanced URL? I have tried refederating and see the same behavior as described above.
The reason I need to change the URL is to move the portal environment to our current load balanced URL that is being used by a server-only environment. I want to avoid any downtime when the switch is made.