Like RDBMS, OrientDB additionally bolsters the reinforcement and reestablish tasks. While executing the reinforcement activity, it will take all documents of the current information base into a packed zip design utilizing the ZIP calculation. This component (Backup) can be profited consequently by empowering the Automatic-Backup worker module.
Taking reinforcement of an information base or sending out a data set is the equivalent, be that as it may, in view of the methodology we need to realize when to utilize reinforcement and when to utilize trade.
While taking reinforcement, it will make a predictable duplicate of an information base, all further compose activities are bolted and standing by to complete the reinforcement cycle. In this activity, it will make a read-just reinforcement record.
In the event that you need the simultaneous peruse and compose activity while taking a reinforcement you need to pick trading a data set as opposed to taking reinforcement of a data set. Fare doesn't bolt the information base and permits simultaneous composes during the fare cycle.
The accompanying assertion is the essential punctuation of information base reinforcement.
./backup.sh <dburl> <user> <password> <destination> [<type>]
Following are the insights regarding the choices in the above grammar.
- <dburl> − The data set URL where the data set is found either in the neighborhood or in the far off area.
- <user> − Specifies the username to run the reinforcement.
- <password> − Provides the secret key for the specific client.
- <destination> − Destination document area expressing where to store the reinforcement compress record.
- <type> − Optional reinforcement type. It has both of the two alternatives.
- Default − locks the data set during the reinforcement.
- LVM − utilizes LVM duplicate on-compose preview in foundation.
Example
Take a reinforcement of the data set demo which is situated in the nearby record framework/pick/orientdb/information bases/demo into a document named test demo.zip and situated into the current registry.
You can utilize the accompanying order to take a reinforcement of the information base demo.
$ backup.sh plocal: opt/orientdb/database/demo admin admin ./backup-demo.zip
Using Console
A similar you can do utilizing the OrientDB reassure. Prior to taking the reinforcement of a specific information base, you need to initially interface with the data set. You can utilize the accompanying order to interface with the data set named demo.
orientdb> CONNECT PLOCAL:/opt/orientdb/databases/demo admin admin
In the wake of interfacing you can utilize the accompanying order to take reinforcement of the information base into a document named 'reinforcement demo.zip' in the current catalog.
orientdb {db=demo}> BACKUP DATABASE ./backup-demo.zip
In the event that this order is executed effectively, you will get some achievement warnings alongside following message.
Backup executed in 0.30 seconds