The cable is not fully replaced. They lift the cable up to a boat and repair it (replacing the damaged bit and joining it to the original) and lower it back down.
They don't replace the cable typically, they fuse it with epoxy and it usually works pretty efficiently, mostly taking the time scheduling the boat and equipment the repair is likely a couple hour job at most and 12-24 for the epoxy to dry.
However, service is restored sooner than that by rerouting service over a different fiber cable or undamaged set of fibers.