Linux command
neo4j-admin 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Dump a database
neo4j-admin database dump --to-path=[/backups] [neo4j]
Load a database
neo4j-admin database load --from-path=[/backups] [neo4j]
Set the initial admin password
neo4j-admin dbms set-initial-password [password]
Check database consistency
neo4j-admin database check [neo4j]
Bulk import CSV data
neo4j-admin database import full --nodes=[nodes.csv] --relationships=[rels.csv] [neo4j]
Show memory recommendations
neo4j-admin server memory-recommendation
说明
neo4j-admin is the administration tool for Neo4j graph databases. It handles backup and restore (dump/load), database consistency checking, bulk data import, memory configuration recommendations, and initial setup tasks. In Neo4j 5+, commands are organized into categories: database (per-database operations like dump, load, import, check), dbms (system-wide operations like setting the initial password), and server (server configuration like memory recommendations). Some operations require the database to be stopped first.
参数
- database dump
- Dump a database to a single-file archive for offline backup.
- database load
- Load a database from a dump file.
- database import full
- Bulk import data from CSV files into a new database.
- database check
- Check database consistency and integrity.
- dbms set-initial-password
- Set the initial admin password before first startup.
- server memory-recommendation
- Print heuristic memory recommendations for heap and pagecache.
- --additional-config _file_
- Provide additional configuration from a file.
- --expand-commands
- Allow command expansion in config values.
- --verbose
- Enable verbose output.
- --help
- Display help information.
FAQ
What is the neo4j-admin command used for?
neo4j-admin is the administration tool for Neo4j graph databases. It handles backup and restore (dump/load), database consistency checking, bulk data import, memory configuration recommendations, and initial setup tasks. In Neo4j 5+, commands are organized into categories: database (per-database operations like dump, load, import, check), dbms (system-wide operations like setting the initial password), and server (server configuration like memory recommendations). Some operations require the database to be stopped first.
How do I run a basic neo4j-admin example?
Run `neo4j-admin database dump --to-path=[/backups] [neo4j]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does database dump do in neo4j-admin?
Dump a database to a single-file archive for offline backup.