Bug 10668 - Remote rsync daemon still showing deleted file
Summary: Remote rsync daemon still showing deleted file
Status: RESOLVED WORKSFORME
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.1
Hardware: x86 Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-22 14:29 UTC by Barry Sanford
Modified: 2014-06-22 17:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Sanford 2014-06-22 14:29:02 UTC

    
Comment 1 Barry Sanford 2014-06-22 14:38:18 UTC
I have a server on my LAN that's hosting an rsync daemon.  When I backup to the 'Backups' module on this server I have a 'pre-exec' script that creates a 'HardLink' file.  Then a 'post-exec' script deletes this file.  After running a backup, I get the following when I list the contents of the server's folder:

$ ssh server.local ls -l /Volumes/Rugged/Backups/EBSMac
total 8
drwx------  9 ebsanford  staff   306 Jun 21 23:58 20140621
drwx------  9 ebsanford  staff   306 Jun 22 00:00 20140622
-rw-------  1 ebsanford  staff  1309 Jun 22 09:15 LOG


$ rsync server.local:/Volumes/Rugged/Backups/EBSMac/
drwxr-xr-x            170 2014/06/22 09:15:04 .
-rw-------          1,309 2014/06/22 09:15:04 LOG
drwx------            306 2014/06/21 23:58:28 20140621
drwx------            306 2014/06/22 00:00:03 20140622


$ rsync server.local::Backups/EBSMac/
Password: xxxx
drwxr-xr-x            204 2014/06/22 09:29:11 .
lrwxr-xr-x              8 2014/06/22 09:29:11 HardLink
-rw-------          1,386 2014/06/22 09:29:11 LOG
drwx------            306 2014/06/21 23:58:28 20140621
drwx------            306 2014/06/22 00:00:03 20140622

Notice in the 3rd listing that the 'HardLink' file is still present!!! I believe this to be fantom lurking around in a cache somewhere.  Restarting the server rsync daemon does not clear the issue.
Comment 2 Barry Sanford 2014-06-22 14:46:51 UTC
Btw, the HardLink file is created by the pre-exec script as a symbolic link to the previous day's backup folder.  For example, if the current backup folder is 201406022, then the pre-exec script will create the HardLink file as:

    cd .../$RSYNC_HOST_NAME
    ln -s 20140621 HardLink
Comment 3 Wayne Davison 2014-06-22 16:32:14 UTC
(In reply to comment #1)
> Notice in the 3rd listing that the 'HardLink' file is still present!!!

It is freshly present, having been created by the pre-xfer exec function (since you used the daemon for the listing).  Thus, it is working exactly as expected.
Comment 4 Barry Sanford 2014-06-22 17:45:57 UTC
Ahhh!!!  The fault, then, is in my own understanding, or lack thereof.  I was under the false assumption that the pre-exec ran only when files were being copied.  But now my understanding is that the scripts run each time the module is accessed by the daemon--correct?

Wayne, thanks for your speedy reply!! 

--Barry