I have a situation that I think might be a bug, but would like someone else to have a look at before I create a report. Here's a list of the source: drwxr-xr-x. 8 root root 4096 Feb 24 10:56 current -rw-r--r--. 2 root root 2427204 Feb 21 12:18 qmailadmin-toaster-1.2.16-1.4.1.src.rpm -rw-r--r--. 2 root root 24875 Mar 1 2012 qmailmrtg-toaster-4.2-1.3.7.src.rpm -rw-r--r--. 2 root root 331753 Mar 8 2012 qmail-toaster-1.03-1.3.22.src.rpm Each of these files is linked to an identically named file in the "current" directory. Then I run rsync as such: rsync --archive \ --compress \ --delay-updates \ --delete-after \ --hard-links \ "$source"/* \ "$target" Afterwards, at the target site: drwxr-xr-x 8 root root 4096 Feb 24 10:56 current -rw-r--r-- 1 root root 2416365 Aug 2 2012 qmailadmin-toaster-1.2.16-1.4.0.src.rpm -rw-r--r-- 2 root root 2427204 Feb 21 12:18 qmailadmin-toaster-1.2.16-1.4.1.src.rpm -rw-r--r-- 2 root root 24875 Mar 1 2012 qmailmrtg-toaster-4.2-1.3.7.src.rpm -rw-r--r-- 2 root root 331753 Mar 8 2012 qmail-toaster-1.03-1.3.22.src.rpm The qmailadmin*1.4.0.src.rpm file was deleted from the "current" directory, but the other in the target root remain (link count was 2, is now 1). I can't figure why the 1.4.0 file isn't being removed. It's not removed on subsequent runs either. Anyone have some insight? TIA. -- -Eric 'shubes'
Matthias Schniedermeyer
2013-Mar-02 20:52 UTC
rsync not deleting file (which was hard linked)
On 02.03.2013 13:14, Eric Shubert wrote:> I have a situation that I think might be a bug, but would like > someone else to have a look at before I create a report....> "$source"/* \As far as i know rsync, this is your error. Ignoring the current-directory you rsync a bunch of files. IIRC rsync doesn't delete files on the commandline, only files missing in a directory. Personally i nearly always sync complete directories. rsync -av source-dir/ target-dir/ (Notice the slashes at the end) That what is very easy to understand and works "unsurprising". -- Matthias