Hi,

Im trying to update multiple devices. Ive been through many many threads and cant see anything similar. I know the usual problem is CSV header issues but mine are ok, the import runs and doesnt throw any errors, it just doesnt update the devices.

ive tried with and without the -m flag and --no-manual.

im running

ruby bulk_import.rb -s myspiceworksurl -e myemailaddress -p mypassword c:\Assets_2013.csv

my headersare,

Name,Device_Type,Serial_Number,Manufacturer,c_purchase_date,c_purchase_price

Many thanks in advance!

Dan.

1 Spice up

bulk_import won’t update devices only import new ones.

Thanks, but according to http://community.spiceworks.com/how_to/show/203-import-devices-into-spiceworks-from-a-csv-file

“A note on updating devices:
If you’d like to update existing devices then you can add the “–no-manual” flag which tells the script to not create new manual devices. You can update existing attributes like purchase price by using the column name c_purchase_price. See the end of the script for a list of know attributes.”

If it doesnt, then it doesnt, and i’ll stop bangin my head against it. But i read that statement as it COULD update.

Ok maybe it does… not used it in yearrrsss…

this is a piped log file…

Debug: working on data file c:\Asset.csv, opts: #<OpenStruct server=“SERVER”, port=80, timeout=200, manual=true, email=“EMAIL@EMAIL.ccom”, pass=“PASSWORD”, verbose=true>
Debug: options: #<OpenStruct server=“SERVER”, port=80, timeout=200, manual=true, email="EMAIL@EMAIL.COM", pass=“PASSWORD”, verbose=true>
Logging into Spiceworks…
Debug: detected UTF-8 encoded CSV
Debug: keys are: [“name”, “c_purchase_price”, “device_type”, “serial_number”, “c_current_value”]
Importing assets…
Debug: post data: {:manually_added=>true, “name”=>“4800g”, “c_purchase_price”=>“2950”, “device_type”=>“Switch”, “serial_number”=>“9T4FE2SB8A680”, “c_current_value”=>“1425”, “description”=>“manually imported from csv file”}

  • imported device 4800g
    goodbye!

it all checks out fine, but nothing is actually updated in my database :frowning:

:frowning:

i’ll raise a support then…

i’ll update if i hear anymore.

I have a similar problem. Trying to UPDATE info in my inventory using bulk import. Seemed to work fine back in 6.2 but now on 7 it is not working consistently. I am specifically trying to update Manufacturer, Model and Location through bulk import. I can successfully update Location without any problem but Manufacturer and Model will not update. The script runs without error. A related issue is that I manually updated several Manufacturers and Models yesterday and they were fine. Today they are all blank again. Does a re-scan override manually input data?

HI guys,

I tried to import a file and I didn’t receive any error, but nothing was imported…no erros obviously… after a lot of headaches I figured out which was the problem… THE DEVICES HAVE THE SAME SERIAL NUMBER… changed that field and now it works porperly!!

I hope it’s helpful for someone else!!

Riccardo

1 Spice up