duane@blur.com
2004-Jan-29 19:41 UTC
different behavior for --backup-dir relative/path vs --backup-dir /full/path
Why does using --delete -b --backup-dir relative/path puts the deleted files in the target folder, while using the full path works as expected? my experimentation... root@feral:/tmp/test (0)>uname -a Linux feral 2.4.22-1.2115.nptlsmp #1 SMP Wed Oct 29 15:30:09 EST 2003 i686 i686 i386 GNU/Linux root@feral:/tmp/test (0)>rsync --version rsync version 2.5.6 protocol version 26 root@feral:/tmp/test (0)>tree . |-- test0 |-- test1 | |-- a | |-- b | `-- c `-- test2 root@feral:/tmp/test (0)>rsync -avv --delete -b --backup-dir test2 test1/ test0 building file list ... expand file_list to 4000 bytes, did move done expand file_list to 4000 bytes, did move deleting in . delta-transmission disabled for local transfer or --whole-file ./ a/ b/ c/ total: matches=0 tag_hits=0 false_alarms=0 data=0 wrote 77 bytes read 20 bytes 194.00 bytes/sec total size is 0 speedup is 0.00 root@feral:/tmp/test (0)>tree . |-- test0 | |-- a | |-- b | `-- c |-- test1 | |-- a | |-- b | `-- c `-- test2 9 directories, 0 files (0)>mv test1/c test1/d root@feral:/tmp/test (0)>rsync -avv --delete -b --backup-dir test2 test1/ test0 building file list ... expand file_list to 4000 bytes, did move done expand file_list to 4000 bytes, did move deleting in . backup_dir is test2 keep_backup c -> test2/c delta-transmission disabled for local transfer or --whole-file ./ d/ total: matches=0 tag_hits=0 false_alarms=0 data=0 wrote 77 bytes read 20 bytes 194.00 bytes/sec total size is 0 speedup is 0.00 root@feral:/tmp/test (0)>tree . |-- test0 | |-- a | |-- b | |-- d | `-- test2 <=== why here if relative path? | `-- c |-- test1 | |-- a | |-- b | `-- d `-- test2 <=== goes here if full path given 11 directories, 0 files
jw schultz
2004-Jan-30 08:48 UTC
different behavior for --backup-dir relative/path vs --backup-dir /full/path
On Thu, Jan 29, 2004 at 11:40:50AM -0800, duane@blur.com wrote:> Why does using --delete -b --backup-dir relative/path > puts the deleted files in the target folder, > while using the full path works as expected?What you describe is exactly as expected. Like --link-dest and --compare-dest, relative paths for --backup-dir are relative to the destination directory. Why this is so becomes obvious if you imagine doing a push to a remote server. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt