During the ancient times, a group of powerful sorcerers convened, determined to solve the problem of how to record something that has been changed throughout time. They channeled mighty energies to tap into the very source of the magical field, in the hope of maybe recording their knowledge there, but instead of accessing the timeless space, an intricate device appeared before them, called the Ark of Time from now on.
This device came from very distant future, where the population tried to solve the very same problem as these sorcerers, but with the advantage of science. Using a strong magnetic field, an artifical time dilation, or some phase shift-inducing thing, they created an object that was able to resist the effect of magical time erasure, and record information stored inside there forever. As these people also knew magic (which was not depleted yet), they connected with the past and sent the object back, to assist the people of that era (or maybe to hide the Ark from some enemy who sought to abuse its powers, and they had no choice).
That's how the knowledge of magic survived, even though it was erased from time. Primitive civilizations got in possesion of the Ark after the event happened, maybe even revered it, and its secrets were spread as mere rumors then. Time passed, catastrophes happened, and the Ark was lost, maybe under the sea, or covered by volcanic material.
Then, archaeologists from the modern era happened to discover the object and unlock the records which, thanks to the genius of its creators, survived over the ages uncorrupted.
The creators from the future were technomancers basically, and they constructed the device in a way to make it immune to even the depletion of magic. They also predicted that such an event may happen, and therefore they also included information on how to restore the timeless magic field, through bare science. 261
Creating a wormhole with certain parameters, using electromagnetic rays of specific frequency etc. allows you to scientifically access the universal source of magic and replenish it with new energy. It would probably took a while, but would be feasible for the people of modern era. This was all predicted by the wise creators.
A thing to point out - the energy level of magic changes over "time", so it is not fundamentally timeless, or constant. However, adding a "second" time dimension to the universe could explain this. With each new "grain" of this time, an universe is born and ends in an instant, being same if the level of magic wasn't changed, or slightly different if it was (if a spell was performed). The Ark would then exist in this "alternate time dimension". 227