On Fri, Jun 26, 2020 at 10:24 AM Budi Janto wrote:

> path = /mnt/DATA
> Any idea or suggestion to prevent client's data loss?
>

There are several options:

   1. 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".
   2. 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.
   3. 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).

..wayne..
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to