samba-bugs@samba.org
2004-Sep-17 20:41 UTC
[Bug 1791] New: using --delete with single directory mirroring doesn't delete files
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@samba.org ReportedBy: donavan@4wx.net QAContact: rsync-qa@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@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@cumulus rsync]# rm dira/tfile.1 rm: remove regular file `dira/tfile.1'? y [root@cumulus rsync]# echo $RANDOM - $RANDOM >> dira/tfile.2 [root@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@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@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.
Possibly Parallel Threads
- --delete and explicitly listed files
- deleting remote dirs I no longer want to backup
- [Bug 1792] New: doing directory only rsync causes an rsync protocol error
- Keeping File Trees in Sync
- mount.cifs is not working (smbclient does work), somekind of recursive content in mount-dir