[GD-General] Multifile atomic updates
Brought to you by:
vexxed72
From: Brian H. <bri...@py...> - 2003-08-16 04:33:59
|
Say you have a patch installer that needs to update the following files: GAME.EXE GAME.DLL NETAPI.DLL The typical way would be to download the patch, apply it to temporary files, then copy over the files upon completion. PATCH GAME.EXE NEWGAME.EXE PATCH GAME.DLL NEWGAME.DLL PATCH NETAPI.DLL NEWNETAPI.DLL //Assume UPDATE renames existing to .EXT.OLD //and copies NEW*.EXT to *.EXT UPDATE GAME.EXE UPDATE GAME.DLL UPDATE NETAPI.DLL Obviously nothing destructive happens until after the patches are applied and you can verify that everything is okay. But what do you do if something bad happens during the destructive update portion, e.g. lost connection to remote disk or power outage or system crash, etc. during the update? The brute force mechanism seems a little, well, brute force, I was wondering if there's something more elegant I could do. Brian |