Hi,
in order to backing up data when I connect to computer an USB HD, I wrote
the follow UDEV rule :
------------------------------------------------------------------
SUBSYSTEM=="block", ACTION=="add", 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/sdcN:
sdcL: 0S: externalS:
disk/by-path/pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0S:
disk/by-id/usb-JMicron_Tech_DB12345681BC-0:0E:
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/sdcE:
DEVNAME=/dev/sdcE: DEVTYPE=diskE: MAJOR=8E: MINOR=32E: SUBSYSTEM=blockE:
USEC_INITIALIZED=11404758453E: ID_VENDOR=JMicronE:
ID_VENDOR_ENC=JMicron\x20E: ID_VENDOR_ID=152dE: ID_MODEL=TechE:
ID_MODEL_ENC=Tech\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20E:
ID_MODEL_ID=0578E: ID_REVISION=0203E:
ID_SERIAL=JMicron_Tech_DB12345681BC-0:0E: ID_SERIAL_SHORT=DB12345681BCE:
ID_TYPE=diskE: ID_INSTANCE=0:0E: ID_BUS=usbE:
ID_USB_INTERFACES=:080650:080662:E: ID_USB_INTERFACE_NUM=00E:
ID_USB_DRIVER=uasE: ID_PATH=pci-0000:00:14.0-usb-0:5.1.2:1.0-scsi-0:0:0:0E:
ID_PATH_TAG=pci-0000_00_14_0-usb-0_5_1_2_1_0-scsi-0_0_0_0E:
ID_PART_TABLE_UUID=0007fd62E: ID_PART_TABLE_TYPE=dosE:
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:0E: TAGS=:systemd:*
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to