# Legacy Bulk Import From Mongodb This article explains how to dump data from MongoDB and import it into Treasure Data. # Install Legacy Bulk Import First, install the [Toolbelt](https://support.treasuredata.com/hc/en-us/articles/command-line), which includes bulk loader program, on your computer. ## Downloads - [Toolbelt Installer for Windows](https://toolbelt.treasuredata.com/win) - [Toolbelt Installer for Mac OS X](https://toolbelt.treasuredata.com/mac) - [Toolbelt Installer for Linux](https://toolbelt.treasuredata.com/linux) After the installation, the td command will be installed on your computer. Open up the terminal, and type td to execute the command. Also, make sure you have java as well. Execute td import:jar_update to download the up-to-date version of our bulk loader: ``` $ td usage: td [options] COMMAND [args] $ java Usage: java [-options] class [args...] $ td import:jar_update Installed td-import.jar 0.x.xx into /path/to/.td/java ``` ## Dump Use the mongoexport command to export a collection into JSON (default) or CSV format as shown below: ``` $ mongoexport --db users --collection contacts --out /tmp/result.json $ mongoexport --db users --collection contacts --csv --out /tmp/result.csv ``` For more information, consult the [MongoDB documentation](http://docs.mongodb.org/manual/reference/mongoexport/). ## Bulk Import from CSV file or JSON file Refer [Bulk Import from CSV files](http://docs.treasuredata.com/display/INT/Bulk+Import+from+CSV+files) about how to import CSV files or [Bulk Import from JSON files](/int/legacy-bulk-import-from-json-file) about how to import JSON files. For further details, check the following pages: - [Bulk Import Internals](/int/legacy-bulk-import-internals) - [Bulk Import Tips and Tricks](/int/legacy-bulk-import-tips-and-tricks)