Date: Thu, 30 Jan 2020 09:10:35 +0100 From: Andrea Venturoli <ml@netfence.it> To: freebsd-questions@freebsd.org Subject: Back up to disk automatically when disk is inserted Message-ID: <12be8560-91ac-f800-4ca2-84175227d280@netfence.it>
next in thread | raw e-mail | index | archive | help
Hello. In an installation of mine, I need the customer to be able to insert an HD and have the server take a backup automatically to it. I labeled the HD and set up a devd configuration file like this: notify 200 { action "/usr/local/sbin/backup_to_disk.shot"; match "type" "CREATE"; match "cdev" "label/BackupHD1"; }; It seems to works perfectly, except for a thing: if the machine boots with the disk already connected, it will start a backup. Is there a way to avoid this? Can devd distinguish already-existing-at-boot labels from after-boot-plugging-in? Failing this, is there some way for my script to check whether the boot process has already ended? bye & Thanks av.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12be8560-91ac-f800-4ca2-84175227d280>