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.
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
(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.
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