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 filesystems. 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 day. TIA, Michael. Michael Pickard Software Engineer Visit London 6th Floor, 2 More London Riverside, London, SE1 2RR Tel: +44 (0)20 7234 5857 Fax: +44 (0)20 7234 5751 www.visitlondon.com Visit London is the official visitor organisation for London. Visit London is partly funded by Partnership, the Mayor's London Development Agency and the Association of London Government. The information contained in this e-mail is confidential and intended for the named recipient(s) only. If you have received it in error, please notify the sender immediately and then delete the message. If you are not the intended recipient, you must not use, disclose, copy or distribute this email. The views expressed in this e-mail are those of the individual and not of Visit London. We reserve the right to read and monitor any email or attachment entering or leaving our systems without prior notice. -------------- next part -------------- HTML attachment scrubbed and removed
> 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 filesystems.I doubt it. Windows Filing system doesn't work that way. You can buy open file managers. But these are designed to allow a file that is opened by another application to be copied not replaced. Are you talking html/bitmap files or data base files? Are you using IIS? IIS does have a cache control on pages IIRC. You tried switching that on? I'm an Apache user myself, can't say I've ever had a problem with open files. What you can do is have a script that monitors open files. I use the program psFile by sysinternals to return a list of open files. So when an opened file is found and then closed by the web server the script could swap the old file with the updated one. Not to difficult to write in the usual scripting manner. Bigger systems of course use clustering to do 'live' update of a web site.
Hello,> 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 filesystems. > 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 day.Try to access the lock file using "Windows shadow copy" More info on this URL: http://www.nasbackup.com/index.php/Web_links#Access_of_windows_shadow_copy_by_rsync Regards, Milutin Voinivich http://www.NasBackup.com/
> -----Original Message----- > From: milutin@nasbackup.com [mailto:milutin@nasbackup.com] > Sent: 06 September 2006 05:03 > To: Michael Pickard > Cc: rsync@lists.samba.org > Subject: RE: File Locking under Windows - a solution ? > > Try to access the lock file using "Windows shadow copy" > > More info on this URL: > >http://www.nasbackup.com/index.php/Web_links#Access_of_windows_shadow_co py> _by_rsync > > Regards, > Milutin Voinivich > http://www.NasBackup.com/ > >Thanks Milutin, Your link seems to link through to http://www.archivesat.com/post1458236.htm : a single post from the rsync user list. As I understand it (via http://tinyurl.com/mcy2m as I have no prior knowledge of the tool), WSC is a backup tool used by Windows Server 2003 - I cannot readily see how that will be of use in my situation. Could you clarify ? Note: I am not having difficulty *reading* locked files, but *writing* locked files. Thanks again, Mike. Michael Pickard Software Engineer Visit London 6th Floor, 2 More London Riverside, London, SE1 2RR Tel: +44 (0)20 7234 5857 Fax: +44 (0)20 7234 5751 www.visitlondon.com Visit London is the official visitor organisation for London. Visit London is partly funded by Partnership, the Mayor's London Development Agency and the Association of London Government. The information contained in this e-mail is confidential and intended for the named recipient(s) only. If you have received it in error, please notify the sender immediately and then delete the message. If you are not the intended recipient, you must not use, disclose, copy or distribute this email. The views expressed in this e-mail are those of the individual and not of Visit London. We reserve the right to read and monitor any email or attachment entering or leaving our systems without prior notice.
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 2. Initialization 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 :-) Rgrds Tev http://itefix.no/cwrysnc --------------------------------------- - 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 filesystems. 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 day.
> -----Original Message----- > From: Stuart Halliday [mailto:StuartH@ecs-tech.com] > Sent: 05 September 2006 15:25 > To: rsync@lists.samba.org > Subject: Re: File Locking under Windows - a solution ? > > > 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 filesystems. > > I doubt it. > Windows Filing system doesn't work that way.Thought as much. We are planning to move to Linux across the board, but these things take time...> > You can buy open file managers. But these are designed to allow a file > that is opened by another application to be copied not replaced. > > Are you talking html/bitmap files or data base files?Mostly .html and images, with some.inc No database files.> > Are you using IIS? IIS does have a cache control on pages IIRC. Youtried> switching that on?I'm using Tomcat on W2K> > I'm an Apache user myself, can't say I've ever had a problem with open > files. > > > What you can do is have a script that monitors open files. > > I use the program psFile by sysinternals to return a list of openfiles.> > So when an opened file is found and then closed by the web server the > script could swap the old file with the updated one. > > Not to difficult to write in the usual scripting manner.Sounds interesting. I'll look into the sysinternals app. Can you provide any pointers to example scripts of the kind you mention ? Thanks, Michael. Michael Pickard Software Engineer Visit London 6th Floor, 2 More London Riverside, London, SE1 2RR Tel: +44 (0)20 7234 5857 Fax: +44 (0)20 7234 5751 www.visitlondon.com Visit London is the official visitor organisation for London. Visit London is partly funded by Partnership, the Mayor's London Development Agency and the Association of London Government. The information contained in this e-mail is confidential and intended for the named recipient(s) only. If you have received it in error, please notify the sender immediately and then delete the message. If you are not the intended recipient, you must not use, disclose, copy or distribute this email. The views expressed in this e-mail are those of the individual and not of Visit London. We reserve the right to read and monitor any email or attachment entering or leaving our systems without prior notice.