I have been using rsync 2.6.6, to do an across the network sync on a quiet system in a Solaris 8 environment. Rsync is compiled from src on the sunfreeware gcc compiler, and has worked excellently in this capacity. We are now wanting to attempt to do a similar thing more often in a 'live' environment (doing hourly snapshots), and in testing to see how locked files were being handled I'm running into an issue both locally and over ssh. My test case: If I start dumping data to a file, say 'cat reallybigfile > newfilename' and then attempt to rsync that file well before the cat is done using the following: from a remote system: rsync -av -e ssh --numeric-ids root@somehost:/srcdir /destdir or locally rsync -av --numeric-ids /srcdir /destdir rsync will transfer a 'partial' file (which was probably the 'whole' file at the second that rsync examined the file) and transfer that portion of the file and exit as if all is kosher. Is it not possible to use rsync to copy files from an live/in-use filesystem? Any suggestions on other methods/means/products of how to do something like this if it is not possible with rsync? Thanks in advance. -b _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
On Wed, Mar 15, 2006 at 05:10:56PM -0500, Buddy Ellis wrote:> rsync will transfer a 'partial' file (which was probably the 'whole' file > at the second that rsync examined the file) and transfer that portion of > the file and exit as if all is kosher.Correct. An if you run rsync later, it will finish the file.> Is it not possible to use rsync to copy files from an live/in-use > filesystem?You'll have to define what you think rsync should do differently, because backing up the data that is there and moving on with the rest of the copy seems like a reasonable behavior to me. Perhaps you'd prefer for rsync to notice when a file is growing and to skip it with a warning? ..wayne..