Skip to content

Instantly share code, notes, and snippets.

@rrevanth
Forked from gerryk/50-autobackup.rules
Created July 4, 2016 05:17
Show Gist options
  • Save rrevanth/005c8d67d4786bd88f6d671f7e412381 to your computer and use it in GitHub Desktop.
Save rrevanth/005c8d67d4786bd88f6d671f7e412381 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