# USB Import script failed

**URL:** <https://community.openenergymonitor.org/t/usb-import-script-failed/13425>\
**Category:** emonSD\
**Tags:** usb-import\
**Created:** [24 February 2020 12:07 UTC](https://community.openenergymonitor.org/t/usb-import-script-failed/13425 "2020-02-24T12:07:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![IanDavies](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/iandavies/32/226_2.png) [@IanDavies](https://community.openenergymonitor.org/u/IanDavies)\
**Post date:** [24 February 2020 12:07 UTC](https://community.openenergymonitor.org/t/usb-import-script-failed/13425/1 "2020-02-24T12:07:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [25 February 2020 12:17 UTC](https://community.openenergymonitor.org/t/usb-import-script-failed/13425/2 "2020-02-25T12:17:32Z")

</div>

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](https://github.com/emoncms/backup/issues/56) do you just have:

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

---

<div class="post-metadata">

**Author:** ![IanDavies](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/iandavies/32/226_2.png) [@IanDavies](https://community.openenergymonitor.org/u/IanDavies)\
**Post date:** [25 February 2020 19:50 UTC](https://community.openenergymonitor.org/t/usb-import-script-failed/13425/3 "2020-02-25T19:50:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rob1](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rob1](https://community.openenergymonitor.org/u/rob1)\
**Post date:** [12 April 2020 16:38 UTC](https://community.openenergymonitor.org/t/usb-import-script-failed/13425/4 "2020-04-12T16:38:38Z")

</div>

I’ve just had a similar problem. My device was showing up as “usb-Generic\_Storage\_Device” as opposed to “usb-Generic\_STORAGE\_DEVICE”

---

<div class="post-metadata">

**Author:** ![Thelmike](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/thelmike/32/13997_2.png) [@Thelmike](https://community.openenergymonitor.org/u/Thelmike)\
**Post date:** [13 May 2020 11:13 UTC](https://community.openenergymonitor.org/t/usb-import-script-failed/13425/5 "2020-05-13T11:13:15Z")

</div>

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?
