USB Import script failed

Hi, I have finally started to upgrade the first of my two Pi’s to the latest emonSD image (27th October 2019), and all went fairly smoothly. So then I wanted to import my data from the old microSD card.
I am using a small USB connected card reader, which I connected to one of the USB ports on my Pi3, and then went to the Backup module and clicked the nice big “Import from USB Drive” button.
The script started, and then immediatley stopped with the error “USB drive not found”.

I found the script was looking for a device with a description of “usb-Generic_Mass-Storage” but mine is called “usb-Generic_Mini_SD_Reader”.

I edited the script (/opt/emoncms/modules/backup/usb-import.sh), removed “_Mini_SD_Reader” from line 29 so that it is just looking for usb-Generic", and ran again and this time it worked and imported all the data and configs.

No idea if this can be fixed easily, but wanted to share in case it helps anyone else.

Ian

Thanks @IanDavies, I’ve added an issue here to keep track of this: Add support for USB import "usb-Generic_Mini_SD_Reader" · Issue #56 · emoncms/backup · GitHub do you just have:

usb=$(ls $disk_id | grep 'usb-Generic')
1 Like

Hi @TrystanLea, yep, that’s exactly what I have, and which worked nicely

I’ve just had a similar problem. My device was showing up as “usb-Generic_Storage_Device” as opposed to “usb-Generic_STORAGE_DEVICE”

And mine as:

usb-USB_2.0_SD_MMC_Reader_842341670035-0:0

I suggest using /dev/disk/by-path/ and grep usb would be safe too?