Skip to content

Instantly share code, notes, and snippets.

@gerryk
Created February 5, 2016 13:15
Show Gist options
  • Save gerryk/8f2c0f75f0f1970e9bba to your computer and use it in GitHub Desktop.
Save gerryk/8f2c0f75f0f1970e9bba to your computer and use it in GitHub Desktop.
UDEV rule to automatically backup stuff when I attach my backup drive
# UDEV rules to setup automatic backup upon disk insertion
# You can get the discriminant informations with the following command :
# udevinfo -a -p $(udevinfo -q path -n /dev/sda)
KERNEL=="sd?1", ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="Maxtor", ATTRS{model}=="Basics Portable", RUN+="/root/autobackup.sh %k"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment