What happens when rsync'ing a file that is damaged bacause of a bad sector on the source medium? I assume that the file will be synchronized partially, overwriting any file of the same name on the destination medium. If that is the case, is there a way to make rsync check readability of files before overwriting them on the target medium (e.g. by synching to a temp. file and, once everything went fine, moving it to its final destination)? -- Dipl.-Phys. Felix E. Klee Email: fk@linuxburg.de (work), felix.klee@inka.de (home) Tel: +49 721 8307937, Fax: +49 721 8307936 Linuxburg, Goethestr. 15a, 76135 Karlsruhe, Germany
flames invited if I've got this wrong. UNLESS --inplace is specified, the error will be detected and the update aborted before the target file is touched.>----- ------- Original Message ------- ----- >From: fk@linuxburg.de >To: rsync@lists.samba.org >Sent: Wed, 30 Aug 2006 12:30:11 > >What happens when rsync'ing a file that is damaged >bacause of a bad sector on >the source medium? I assume that the file will be >synchronized partially, >overwriting any file of the same name on the >destination medium. If that is >the case, is there a way to make rsync check >readability of files before >overwriting them on the target medium (e.g. by >synching to a temp. file and, >once everything went fine, moving it to its final >destination)? > >-- >Dipl.-Phys. Felix E. Klee >Email: fk@linuxburg.de (work), felix.klee@inka.de >(home) >Tel: +49 721 8307937, Fax: +49 721 8307936 >Linuxburg, Goethestr. 15a, 76135 Karlsruhe, Germany > >-- >To unsubscribe or change options: >https://lists.samba.org/mailman/listinfo/rsync >Before posting, read: >http://www.catb.org/~esr/faqs/smart-questions.html
I should clarify... On 8/30/06, Felix E. Klee <fk@linuxburg.de> wrote:> I assume that the file will be synchronized partially, > overwriting any file of the same name on the destination medium.That behavior is not the default. It is enabled by --inplace.> If that is > the case, is there a way to make rsync check readability of files before > overwriting them on the target medium (e.g. by synching to a temp. file and, > once everything went fine, moving it to its final destination)?Synching to a temporary file first is the default behavior. Matt
On Wed, Aug 30, 2006 at 04:27:36PM -0400, Matt McCutchen wrote:> That behavior is not the default. It is enabled by --inplace.Also, when --partial is used (without a partial-dir) the erroneous file will be kept, overwriting any existing destination file. I personally have RSYNC_PARTIAL_DIR set in my environment so that whenever I use --partial (or, more often, -P) rsync does not overwrite a destination file with a version that is not complete. ..wayne..