Hi, I have question about the behavior of --backup-dir with --delete-after option. In my testing with version 2.6.4, it appears that the backup option only backups altered files. Files that will be deleted on the destination system will NOT be placed in --backup-dir location. I would like to back up deleted files. Is there a way to do this? Thanks
On Wed, Apr 06, 2005 at 05:42:19PM -0400, Chimento, Douglas wrote:> I have question about the behavior of --backup-dir with > --delete-after option.You've discovered a bug in generator.c. It is fixed by this patch: --- generator.c 5 Apr 2005 20:08:51 -0000 1.198 +++ generator.c 7 Apr 2005 08:07:10 -0000 @@ -1132,6 +1132,7 @@ void generate_files(int f_out, struct fi int save_only_existing = only_existing; int save_opt_ignore_existing = opt_ignore_existing; int save_do_progress = do_progress; + int save_make_backups = make_backups; allowed_lull = read_batch ? 0 : (io_timeout + 1) / 2; lull_mod = allowed_lull * 5; @@ -1240,6 +1241,7 @@ void generate_files(int f_out, struct fi phase++; only_existing = save_only_existing; opt_ignore_existing = save_opt_ignore_existing; + make_backups = save_make_backups; if (verbose > 2) rprintf(FINFO,"generate_files phase=%d\n",phase); Thanks for the report, ..wayne..
Thanks for quick turn around. I will test it out and let you know the results. -----Original Message----- From: Wayne Davison [mailto:wayned@samba.org] Sent: Thursday, April 07, 2005 3:13 AM To: Chimento, Douglas Cc: rsync@lists.samba.org Subject: Re: backup option On Wed, Apr 06, 2005 at 05:42:19PM -0400, Chimento, Douglas wrote:> I have question about the behavior of --backup-dir with > --delete-after option.You've discovered a bug in generator.c. It is fixed by this patch: --- generator.c 5 Apr 2005 20:08:51 -0000 1.198 +++ generator.c 7 Apr 2005 08:07:10 -0000 @@ -1132,6 +1132,7 @@ void generate_files(int f_out, struct fi int save_only_existing = only_existing; int save_opt_ignore_existing = opt_ignore_existing; int save_do_progress = do_progress; + int save_make_backups = make_backups; allowed_lull = read_batch ? 0 : (io_timeout + 1) / 2; lull_mod = allowed_lull * 5; @@ -1240,6 +1241,7 @@ void generate_files(int f_out, struct fi phase++; only_existing = save_only_existing; opt_ignore_existing = save_opt_ignore_existing; + make_backups = save_make_backups; if (verbose > 2) rprintf(FINFO,"generate_files phase=%d\n",phase); Thanks for the report, ..wayne..