- OrientDB Tutorial
- OrientDB - Home
- OrientDB - Overview
- OrientDB - Installation
- OrientDB - Basic Concepts
- OrientDB - Data Types
- OrientDB - Console Modes
- OrientDB Database Commands
- OrientDB - Create Database
- OrientDB - Alter Database
- OrientDB - Backup Database
- OrientDB - Restore Database
- OrientDB - Connect Database
- OrientDB - Disconnect Database
- OrientDB - Info Database
- OrientDB - List Database
- OrientDB - Freeze Database
- OrientDB - Release Database
- OrientDB - Config Database
- OrientDB - Export Database
- OrientDB - Import Database
- OrientDB - Commit Database
- OrientDB - Rollback Database
- OrientDB - Optimize Database
- OrientDB - Drop Database
- OrientDB Record Commands
- OrientDB - Insert Record
- OrientDB - Display Records
- OrientDB - Load Record
- OrientDB - Reload Record
- OrientDB - Export Record
- OrientDB - Update Record
- OrientDB - Truncate Record
- OrientDB - Delete Record
- OrientDB Class Commands
- OrientDB - Create Class
- OrientDB - Alter Class
- OrientDB - Truncate Class
- OrientDB - Drop Class
- OrientDB Cluster Commands
- OrientDB - Create Cluster
- OrientDB - Alter Cluster
- OrientDB - Truncate Cluster
- OrientDB - Drop Cluster
- OrientDB Property Commands
- OrientDB - Create Property
- OrientDB - Alter Property
- OrientDB - Drop Property
- OrientDB Vertex Commands
- OrientDB - Create Vertex
- OrientDB - Move Vertex
- OrientDB - Delete Vertex
- OrientDB Edge Commands
- OrientDB - Create Edge
- OrientDB - Update Edge
- OrientDB - Delete Edge
- OrientDB Advanced Concepts
- OrientDB - Functions
- OrientDB - Sequences
- OrientDB - Indexes
- OrientDB - Transactions
- OrientDB - Hooks
- OrientDB - Caching
- OrientDB - Logging
- OrientDB - Performance Tuning
- OrientDB - Upgrading
- OrientDB - Security
- OrientDB - Studio
- OrientDB Interfaces
- OrientDB - Java Interface
- OrientDB - Python Interface
- OrientDB Useful Resources
- OrientDB - Quick Guide
- OrientDB - Useful Resources
- OrientDB - Discussion
OrientDB - Export Database
Like RDBMS, OrientDB also provides features like Export and Import the database. OrientDB uses the JSON format to export the data. By default export command is using the GZIP algorithm to compress the files.
While exporting a database it is not locking the database, which means you can perform concurrent read and write operations on it. It also means that you can create an exact copy of that data because of concurrent read and write operations.
In this chapter, you can learn how to export the database from the OrientDB command line.
The following statement is the basic syntax of the Export database command.
EXPORT DATABASE <output file>
Note − You can use this command only after connecting to a particular database.
Example
In this example, we will use the same database named ‘demo’ that we created in the previous chapter. You can use the following command to export the database to a file named ‘export-demo’.
orientdb {db = demo}> EXPORT DATABASE ./export-demo.export
If it is successfully executed, it will create a file named ‘export-demo.zip’ or ‘exportdemo.gz’ based on the operating system and you will get the following output.
Exporting current database to: DATABASE /home/linuxtp/Desktop/demo.export in GZipped JSON format ... Started export of database 'demo' to /home/linuxtp/Desktop/demo.export.gz... Exporting database info...OK Exporting clusters...OK (12 clusters) Exporting schema...OK (11 classes) Exporting records... - Cluster 'internal' (id = 0)...OK (records = 3/3) - Cluster 'index' (id = 1)...OK (records = 0/0) - Cluster 'manindex' (id = 2)...OK (records = 0/0) - Cluster 'default' (id = 3)...OK (records = 0/0) - Cluster 'orole' (id = 4)...OK (records = 3/3) - Cluster 'ouser' (id = 5)...OK (records = 3/3) - Cluster 'ofunction' (id = 6)...OK (records = 0/0) - Cluster 'oschedule' (id = 7)...OK (records = 0/0) - Cluster 'orids' (id = 8)...OK (records = 0/0) - Cluster 'v' (id = 9)...OK (records = 0/0) - Cluster 'e' (id = 10)...OK (records = 0/0) - Cluster '_studio' (id = 11)...OK (records = 1/1) Done. Exported 10 of total 10 records Exporting index info... - Index dictionary...OK - Index OUser.name...OK - Index ORole.name...OK OK (3 indexes) Exporting manual indexes content... - Exporting index dictionary ...OK (entries = 0) OK (1 manual indexes) Database export completed in 377ms