How can an old system be updated without stopping work?
Functions are moved to the new path one at a time: the new and old parts run side by side for a while, and requests are gradually switched to the new one. Each step is small and reversible, a backup is made before it, and the system's current behaviour is captured in tests.
More in the guide to legacy system modernization.