<div dir="ltr"><div dir="ltr">On Fri, Jun 26, 2020 at 10:24 AM Budi Janto wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">path = /mnt/DATA<br>
Any idea or suggestion to prevent client's data loss?<br></blockquote><div><br></div><div>There are several options:</div><div><ol><li>Set the "pre-xfer exec = /script/name" in your daemon module and make the script check if a /mnt/DATA/known-to-exist-subdir is missing and if so, do an "exit 1".</li><li>If your server rsync is at least 3.2.1, set the "early exec = /script/name" in your daemon module and make the script verify that the drive is mounted & attempt to mount it if it is not (return an error code if unable to mount it).  The mount action is not possible in the pre-xfer exec script because rsync has already done a chdir to the empty mount by the time this script runs.</li><li>Move everything down into a deeper directory and tweak the path in your daemon module to be "path = /mnt/DATA/subdir" so that the transfer will fail when the mount is not there (because the subdir is not there).<br></li></ol></div><div>..wayne.. <br></div></div></div>