[Bug 1791] New: using --delete with single directory mirroring
doesn't delete files
samba-bugs at samba.org
samba-bugs at samba.org
Fri Sep 17 20:27:55 GMT 2004
https://bugzilla.samba.org/show_bug.cgi?id=1791
Summary: using --delete with single directory mirroring doesn't
delete files
Product: rsync
Version: 2.6.3
Platform: x86
OS/Version: Linux
Status: NEW
Severity: major
Priority: P3
Component: core
AssignedTo: wayned at samba.org
ReportedBy: donavan at 4wx.net
QAContact: rsync-qa at samba.org
example is probably the best way. But due to lack of bandwidth I only mirror
selected directories on remote sites. However, using rysnc with the --delete
option doesn't delete missing files (from the source) in the destination directory.
Example (very simple)
root at cumulus rsync]# ls -laR
.:
total 16
drwxr-xr-x 4 root root 4096 Sep 17 15:13 .
drwxr-x--- 25 root root 4096 Sep 17 15:13 ..
drwxr-xr-x 2 root root 4096 Sep 17 15:13 dira
drwxr-xr-x 2 root root 4096 Sep 17 15:14 dirb
./dira:
total 16
drwxr-xr-x 2 root root 4096 Sep 17 15:13 .
drwxr-xr-x 4 root root 4096 Sep 17 15:13 ..
-rw-r--r-- 1 root root 16 Sep 17 15:13 tfile.1
-rw-r--r-- 1 root root 16 Sep 17 15:13 tfile.2
./dirb:
total 16
drwxr-xr-x 2 root root 4096 Sep 17 15:14 .
drwxr-xr-x 4 root root 4096 Sep 17 15:13 ..
-rw-r--r-- 1 root root 16 Sep 17 15:13 tfile.1
-rw-r--r-- 1 root root 16 Sep 17 15:13 tfile.2
root at cumulus rsync]# rm dira/tfile.1
rm: remove regular file `dira/tfile.1'? y
[root at cumulus rsync]# echo $RANDOM - $RANDOM >> dira/tfile.2
[root at cumulus rsync]# ls -laR
.:
total 16
drwxr-xr-x 4 root root 4096 Sep 17 15:13 .
drwxr-x--- 25 root root 4096 Sep 17 15:13 ..
drwxr-xr-x 2 root root 4096 Sep 17 15:16 dira
drwxr-xr-x 2 root root 4096 Sep 17 15:14 dirb
./dira:
total 12
drwxr-xr-x 2 root root 4096 Sep 17 15:16 .
drwxr-xr-x 4 root root 4096 Sep 17 15:13 ..
-rw-r--r-- 1 root root 30 Sep 17 15:16 tfile.2
./dirb:
total 16
drwxr-xr-x 2 root root 4096 Sep 17 15:14 .
drwxr-xr-x 4 root root 4096 Sep 17 15:13 ..
-rw-r--r-- 1 root root 16 Sep 17 15:13 tfile.1
-rw-r--r-- 1 root root 16 Sep 17 15:13 tfile.2
root at cumulus rsync]# rsync -lptgoDv --delete dira/* dirb
tfile.2
sent 124 bytes received 40 bytes 328.00 bytes/sec
total size is 30 speedup is 0.18
[root at cumulus rsync]# ls -laR
.:
total 16
drwxr-xr-x 4 root root 4096 Sep 17 15:13 .
drwxr-x--- 25 root root 4096 Sep 17 15:13 ..
drwxr-xr-x 2 root root 4096 Sep 17 15:16 dira
drwxr-xr-x 2 root root 4096 Sep 17 15:17 dirb
./dira:
total 12
drwxr-xr-x 2 root root 4096 Sep 17 15:16 .
drwxr-xr-x 4 root root 4096 Sep 17 15:13 ..
-rw-r--r-- 1 root root 30 Sep 17 15:16 tfile.2
./dirb:
total 16
drwxr-xr-x 2 root root 4096 Sep 17 15:17 .
drwxr-xr-x 4 root root 4096 Sep 17 15:13 ..
-rw-r--r-- 1 root root 16 Sep 17 15:13 tfile.1
-rw-r--r-- 1 root root 30 Sep 17 15:16 tfile.2
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the rsync
mailing list