[resending, I made a typo in the list address]

[ Please Cc: 624826-forwar...@bugs.debian.org on any replies ]

Please see the bug report below. In short, when using --partial together
with --update, an interrupted file will get the current timestamp, and
hence when redoing the transfer the file is skipped due to --update.

I've created a patch that sets the timestamp to 0 when a file transfer
is interrupted, which was suggested by the bug reporter and sounds
sensible to me.

Any possible hidden gotcha's?


Paul


--- a/cleanup.c 2012-04-15 14:14:02.913993934 +0200
+++ b/cleanup.c 2012-04-15 14:13:58.834033097 +0200
@@ -157,8 +157,9 @@
                                flush_write_file(cleanup_fd_w);
                                close(cleanup_fd_w);
                        }
+                       cleanup_file->modtime = 0; /* solves problem with 
--partial --update */
                        finish_transfer(cleanup_new_fname, fname, NULL, NULL,
-                                       cleanup_file, 0, !partial_dir);
+                                       cleanup_file, 1, !partial_dir);
                }
 
                /* FALLTHROUGH */


On Sun 01 May 2011, Samuel Thibault wrote:
> 
> Hello,
> 
> My rsync script uses both options -u and --partial. This results into
> partial files not being completed:
> 
> - start a transfer, stop it. --partial makes the file be left to avoid
>   re-transferring the beginning of the file
> - restart the transfer. Since destination already has a file (the one
>   left by --partial), -u prevents rsync from transferring the remainder
>   of the file.
> 
> Maybe --partial should for instance set the file time to 1970-01-01 to
> mark the file as "partial" and make sure that further rsync calls etc.
> will continue the transfer?
> 
> Samuel
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to