Back up to disk automatically when disk is inserted
Andrea Venturoli
ml at netfence.it
Thu Jan 30 08:10:46 UTC 2020
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.
More information about the freebsd-questions
mailing list