neo4j-admin 使用 笔记
neo4j-admin使用笔记
建议还是先用 neo4j-import
,比neo4j-admin
好用多了
neo4j-admin import
虽然在以后的版本里会把 neo4j-import
替掉,但是我感觉neo4j-import
好用,比neo4j-admin import
多一些参数
C:\ProfessionSofware\Neo4j\neo4j-community-3.3.1\bin
λ neo4j-admin help
usage: neo4j-admin <command>
Manage your Neo4j instance.
environment variables:
NEO4J_CONF Path to directory which contains neo4j.conf.
NEO4J_DEBUG Set to anything to enable debug output.
NEO4J_HOME Neo4j home directory.
HEAP_SIZE Set size of JVM heap during command execution.
Takes a number and a unit, for example 512m.
available commands:
General
check-consistency
Check the consistency of a database.
help
This help text, or help for the command specified in <command>.
import
Import from a collection of CSV files or a pre-3.0 database.
store-info
Prints information about a Neo4j database store.
Authentication
set-default-admin
Sets the default admin user when no roles are present.
set-initial-password
Sets the initial password of the initial admin user ('neo4j').
Offline backup
dump
Dump a database into a single-file archive.
load
Load a database from an archive created with the dump command.
Use neo4j-admin help <command> for more details.
WKQ@WKQ-PC C:\ProfessionSofware\Neo4j\neo4j-community-3.1.2\bin
> neo4j-admin import -help
警告: This command does not appear to be running with administrative rights. Some commands may fail e.g. Start/Stop
Directory 'C:\ProfessionSofware\Neo4j\neo4j-community-3.1.2\data\databases\graph.db' already contains a database
usage: neo4j-admin import [--mode=csv] [--database=<name>]
[--additional-config=<config-file-path>]
[--report-file=<filename>]
[--nodes[:Label1:Label2]=<"file1,file2,...">]
[--relationships[:RELATIONSHIP_TYPE]=<"file1,file2,...">]
[--id-type=<STRING|INTEGER|ACTUAL>]
[--input-encoding=<character-set>]
usage: neo4j-admin import --mode=database [--database=<name>]
[--additional-config=<config-file-path>]
[--from=<source-directory>]
Import a collection of CSV files with --mode=csv (default), or a database from a
pre-3.0 installation with --mode=database.
options:
--database=<name>
Name of database. [default:graph.db]
--additional-config=<config-file-path>
Configuration file to supply additional configuration in. [default:]
--mode=<database|csv>
Import a collection of CSV files or a pre-3.0 installation. [default:csv]
--from=<source-directory>
The location of the pre-3.0 database (e.g. <neo4j-root>/data/graph.db).
[default:]
--report-file=<filename>
File in which to store the report of the csv-import.
[default:import.report]
--nodes[:Label1:Label2]=<"file1,file2,...">
Node CSV header and data. Multiple files will be logically seen as one big
file from the perspective of the importer. The first line must contain the
header. Multiple data sources like these can be specified in one import,
where each data source has its own header. Note that file groups must be
enclosed in quotation marks. [default:]
--relationships[:RELATIONSHIP_TYPE]=<"file1,file2,...">
Relationship CSV header and data. Multiple files will be logically seen as
one big file from the perspective of the importer. The first line must
contain the header. Multiple data sources like these can be specified in
one import, where each data source has its own header. Note that file
groups must be enclosed in quotation marks. [default:]
--id-type=<STRING|INTEGER|ACTUAL>
Each node must provide a unique id. This is used to find the correct nodes
when creating relationships. Possible values are:
STRING: arbitrary strings for identifying nodes,
INTEGER: arbitrary integer values for identifying nodes,
ACTUAL: (advanced) actual node ids.
For more information on id handling, please see the Neo4j Manual:
https://neo4j.com/docs/operations-manual/current/tools/import/
[default:STRING]
--input-encoding=<character-set>
Character set that input data is encoded in. [default:UTF-8]