Bug 673223

Summary: rsync --delete fails to function on local directories
Product: Red Hat Enterprise Linux 6 Reporter: RedHatBugMonkey
Component: rsyncAssignee: Vojtech Vitek <vvitek>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0CC: hripps, rvokal
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-27 11:36:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RedHatBugMonkey 2011-01-27 18:34:18 UTC
Description of problem:

rsync --delete fails to function on local directories

Version-Release number of selected component (if applicable):

rsync-3.0.6-5.el6.x86_64

How reproducible:

have a destination directory with extra files present, attempt to rsync into destination directory using rysnc with --delete option.

Steps to Reproduce:
1.  ...
2.
3.
  
Actual results:

rhbm@rhel6:~ >ls -l
total 8
drwxrwxr-x. 2 rhbm rhbm 4096 Jan 27 12:27 dest
drwxrwxr-x. 2 rhbm rhbm 4096 Jan 27 12:22 src
rhbm@rhel6:~ >ls -lR
.:
total 8
drwxrwxr-x. 2 rhbm rhbm 4096 Jan 27 12:27 dest
drwxrwxr-x. 2 rhbm rhbm 4096 Jan 27 12:22 src

./dest:
total 4
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 garbage

./src:
total 12
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file1
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file3
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file7


rhbm@rhel6:~ >rsync -aHv --delete src/file* dest/.
sending incremental file list
file1
file3
file7

sent 5330 bytes  received 69 bytes  10798.00 bytes/sec
total size is 5136  speedup is 0.95


rhbm@rhel6:~ >ls -lR
.:
total 8
drwxrwxr-x. 2 rhbm rhbm 4096 Jan 27 12:27 dest
drwxrwxr-x. 2 rhbm rhbm 4096 Jan 27 12:22 src

./dest:
total 16
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file1
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file3
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file7
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 garbage

./src:
total 12
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file1
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file3
-rw-r--r--. 1 rhbm rhbm 1712 Jan 27 12:22 file7


Expected results:

that the file garbage is removed from the destination directory.

Additional info:

Comment 1 RedHatBugMonkey 2011-01-27 18:43:31 UTC
User Error.  The man page explains fully under the expanded --delete info.

Comment 3 RHEL Program Management 2011-01-27 19:08:28 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.