Re: UDEV RULES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I use crontab to run an rsync command...

On 6/30/19 8:38 AM, Angelo Moreschini wrote:
Hi,
in order to backing up data when I connect to computer an USB HD, I wrote the follow UDEV rule :
------------------------------------------------------------------
SUBSYSTEM=="block", ACTION="" ATTRS{vendor}=="152d", ATTRS{model}=="0578",  SYMLINK+="external%n", RUN+="/usr/bin/mrs-auto_backup.sh"
-------------------------------------------------------------------
the rule is the content of the file : /etc/udev/rules.d/10.autobackup.rules
that I self created .

I learned this method at the link : https://www.tecmint.com/auto-backup-files-to-usb-media-in-linux/  ("How to backup files to USB media when connected")

As well I tried in many different combinations and parameters values, never I was able to execute the script inside the rule.

-----
In order to get the USB HD characteristic of the USB Hard Disk to use for backing-up the data I used the command :
<sudo udevadm info -q all -n /dev/sdc>
and its output is transcribed below

Could someone help me to understand because this rule doesn't works ?

thank you
regards
Angelo
-------------------
features (attributes) of the USB Hrd Disk that I got with the above command    :
[angelo_dev@localhost ~]$ sudo udevadm info -q all -n /dev/sdc

P: /devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5.1/3-5.1.2/3-5.1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc
N: sdc
L: 0
S: external
S: disk/by-path/pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0
S: disk/by-id/usb-JMicron_Tech_DB12345681BC-0:0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5.1/3-5.1.2/3-5.1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc
E: DEVNAME=/dev/sdc
E: DEVTYPE=disk
E: MAJOR=8
E: MINOR=32
E: SUBSYSTEM=block
E: USEC_INITIALIZED=11404758453
E: ID_VENDOR=JMicron
E: ID_VENDOR_ENC=JMicron\x20
E: ID_VENDOR_ID=152d
E: ID_MODEL=Tech
E: ID_MODEL_ENC=Tech\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_MODEL_ID=0578
E: ID_REVISION=0203
E: ID_SERIAL=JMicron_Tech_DB12345681BC-0:0
E: ID_SERIAL_SHORT=DB12345681BC
E: ID_TYPE=disk
E: ID_INSTANCE=0:0
E: ID_BUS=usb
E: ID_USB_INTERFACES=:080650:080662:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=uas
E: ID_PATH=pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_5_1_2_1_0-scsi-0_0_0_0
E: ID_PART_TABLE_UUID=0007fd62
E: ID_PART_TABLE_TYPE=dos
E: DEVLINKS=/dev/external /dev/disk/by-path/pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0 /dev/disk/by-id/usb-JMicron_Tech_DB12345681BC-0:0
E: TAGS=:systemd:



_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux