# Bulk update hosts

Instead of editing hosts one by one, you can manage your inventory in bulk: export the host list to a CSV file, edit it offline in a spreadsheet or text editor, then import the updated file. Axoflow compares the file against your current inventory and applies the changes.

Using this workflow, you can:

  * Update the description and [labels](../../../docs/axoflow/onboard-hosts/hosts/add-host-metadata/index.md) of existing hosts.
  * Add new hosts.
  * Delete hosts.



Note If you’d like to manage your hosts from an external Configuration Management Database (CMDB) like ServiceNow, [contact us](<https://axoflow.com/contact>) for integration options. 

The **Export/Import CSV** option is available on the **Routers** page (for AxoRouters) and on the **Sources** page (for source and edge hosts).

## Export the inventory list

  1. Open the **Routers** or the **Sources** page.

  2. (Optional) [Filter or search](../../../docs/axoflow/onboard-hosts/hosts/find-host/index.md#routers) the list to narrow down the hosts you want to work with.

Note The exported file contains exactly the hosts shown in the list, so any active filter or search also applies to the export. 

  3. Select **Export/Import CSV** , then on the **Export** tab select **Export CSV**.

The current list is downloaded as a CSV file.

![Export host inventory from AxoConsole](/docs/axoflow/onboard-hosts/hosts/bulk-update-hosts/export-host-inventory_hu_cb61b78d4eaee7d3.webp)




## Edit the CSV file

The exported file has one row per host and the following columns, for example:
```
 
    name,type,description,label.app,label.building,label.discovered,label.hostGroup,label.location,label.os,label.platform,label.product,label.rack,label.targetSample,label.team,label.vendor,fqdn,ip
    arbor-edge-ppa,APPLIANCE,,,,,,,,,arbor-edge,,,,netscout,arbor-edge-ppa,192.168.9.99
    azure-us-east-2-eventhub,APPLIANCE,,,2,,8,us-east-2,,,azure-event-hub,A,,windows,microsoft,azure-us-east-2-eventhub,10.192.23.63
    
```

  * `name`: The unique name of the host. This is what identifies the host, so keep it unchanged for hosts you want to update. The name must be a valid hostname and must be unique within the file. Required.
  * `type`: The type of the host: `APPLIANCE`, `EDGE`, or `ROUTER`. You can’t change the type of an existing host. To delete a host, set this column to `DELETED`.
  * `description`: A free-text description of the host.
  * `label.<key>`: Each label is a separate column named after its key, for example `label.location`. The cell holds the label value. To add a new label to every host, add a new `label.<key>` column. To add a label to a single host, fill in its cell and leave the others empty. Label keys follow the same rules as [labels added in the UI](../../../docs/axoflow/onboard-hosts/hosts/add-host-metadata/index.md).
  * `fqdn`, `ip`: The fully qualified domain name and IP address of the host. You can only set these for `APPLIANCE` hosts. For other host types, these values are reported by the agent and can’t be changed, so leave them as exported.



When editing the file, keep the following in mind:

  * **The file is the desired state.** For the fields you can edit (description, labels, and the `fqdn` and `ip` of appliances), clearing a cell clears that value on the host. For example, emptying a `label.<key>` cell removes that label from the host.
  * **Adding a host:** Add a new row. You can only add type `APPLIANCE` hosts, and each new host needs at least an `fqdn` or an `ip`. To add a ROUTER or an EDGE host, provision an [AxoRouter](../../../docs/axoflow/provisioning/axorouter/index.md) or an [Axoflow agent](../../../docs/axoflow/provisioning/windows-opentelemetry/index.md).
  * **Deleting a host:** Set the `type` column of the row to `DELETED`.
  * **Hosts you leave out are untouched.** Only the rows in the file are processed. Removing a row from the file does not delete the host — use `DELETED` for that.



## Import the edited CSV file

  1. On the **Routers** or the **Sources** page, select **Export/Import CSV** , then open the **Import** tab.

![Import host inventory from CSV](/docs/axoflow/onboard-hosts/hosts/bulk-update-hosts/import-host-inventory_hu_b526dad2e85db081.webp)

  2. Upload the edited CSV file.

AxoConsole compares the file against the current inventory and shows a summary of the changes to be made: how many hosts will be added, updated, and removed.

If the file contains errors, they’re listed per row and column so you can correct them and upload the file again.

  3. Review the summary.

![Import host inventory from CSV](/docs/axoflow/onboard-hosts/hosts/bulk-update-hosts/import-host-inventory_hu_b526dad2e85db081.webp)

Note Changes are applied one by one, and are listed one-by-one in the [**Activity Logs**](../../../docs/axoflow/activity-log/index.md). To stop an import that’s in progress, close the dialog. Changes that have already been applied stay in place. 

**CAUTION:**

Deleting hosts (`DELETED`) and clearing values can’t be undone. Review the change summary carefully before importing.

Select **Import CSV** to apply the changes.