File Locking under Windows - a solution ?
tevfik at itefix.no
Wed Sep 6 09:17:09 GMT 2006
What about using some staging logic if you have enough disk space and can
introduce the logic required into your system :
1. Keep two copies of your files on your live servers: FEED-A and FEED-B
a. rsync FEED-A and FEED-B with the preview server content
b. Select FEED-A as the current feed for live servers
3. Go live with the active feed.
4. When update is needed
a. Rsync the contents of the inactive feed (FEED-B for the first time)
with the preview server
b. Select FEED-B as the current feed, making FEED-A (for the first time)
inactive and ready for update in the next cycling
5. Repeat stage 3-4 :-)
We are currently using Rsync (with cygwin) to propagate static files from a
preview server (Windows) to our live servers (Windows) on demand.
Unfortunately, because the live servers are *live*, inevitably some of the
files we mean to update are in use and therefore locked by the windows
filesystem. Since they are locked, they are not updated, and our servers get
out of synch.
Does anyone know of a way this locking can be overridden ? is it possible
to force updates ? it is important that all live servers have identical
There is an option to bring down each server, update the relevant
directories, and bring the server back up: but this is highly undesirable.
Updates are daily at least, and sometimes may occur half-a-dozen times a
More information about the rsync