Executes a complete backup on the currently opened database. It then compresses the backup file using the ZIP algorithm. You can then restore a database from backups, using the
RESTORE DATABASE command. You can automate backups using the Automatic-Backup server plugin.
NOTE: OrientDB Community Edition does not support backing up remote databases. OrientDB Enterprise Edition does support this feature. For more information on how to implement this with Enterprise Edition, see Remote Backups.
BACKUP DATABASE <output-file> [-incremental] [-compressionLevel=<compressionLevel>] [-bufferSize=<bufferSize>]
<output-file>Defines the path to the backup file.
-incrementalOption to execute an incremental backup. When enabled, it computes the data to backup as all new changes since the last backup. Available only in the OrientDB Enterprise Edition version 2.2 or later.
compressionLevelDefines the level of compression for the backup file. Valid levels are
9. The default is
9. Available in 1.7 or later.
-bufferSizeDefines the compression buffer size. By default, this is set to 1MB. Available in 1.7 or later.
In order to enable a user to execute this command, you must add the permission of
create for the resource
database.backup to the database user.
- Backing up a database:
CONNECT plocal:../databases/mydatabase admin adminorientdb>
BACKUP DATABASE /backups/mydb.zipBacking current database to: database mydb.zip Backup executed in 0.52 seconds
For more information, see: