I have orientdb 2.0.5 running in server mode, being accessed remotely by a
web server. I want to take a manual backup and restore it on a different
server.
Per online documentation, the backup command does not work via remote
connection. I have to ssh into the db server, open a orientdb console, and
connect via plocal. Here we go...
# /usr/bin/orientdb-community-2.0.5/bin/console.sh
OrientDB console v.2.0.5 (build UNKNOWN@r; 2015-03-12 22:59:10+0000) www.
orientechnologies.com
Type 'help' to display all the supported commands.
Installing extensions for GREMLIN language v.2.6.0
orientdb> connect plocal:/data/orientdb/mydb admin admin
Connecting to database [plocal:/data/orientdb/mydb] with user 'admin'...
Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot
open local storage '/data/orientdb/mydb' with mode=rw
Error: com.orientechnologies.orient.core.exception.OSerializationException:
Cannot load database's configuration. The database seems to be corrupted.
Error: com.orientechnologies.common.concur.lock.OLockException: File '/data/
orientdb/mydb/database.ocf' is locked by another process, maybe the
database is in use by another process. Use the remote mode with a OrientDB
server to allow multiple access to the same database.
It seems like in order to connect via plocal, orientdb must not be running
in server mode. In order to continue I must cut off my web users from the
db altogether. Here we go...
# /etc/init.d/orientdb.sh stop
Stopping OrientDB server daemon...
# /usr/bin/orientdb-community-2.0.5/bin/console.sh
OrientDB console v.2.0.5 (build UNKNOWN@r; 2015-03-12 22:59:10+0000) www.
orientechnologies.com
Type 'help' to display all the supported commands.
Installing extensions for GREMLIN language v.2.6.0
orientdb> connect plocal:/data/orientdb/mydb admin admin
Connecting to database [plocal:/data/orientdb/mydb] with user 'admin'...OK
orientdb {db=mydb}> backup database orientdb-backup-mydb.zip
This command works. The backup completes in 15 minutes and now I can exit
from the console, and start server mode to restore access to my end users...
orientdb {db=mydb}> exit
# /etc/init.d/orientdb.sh start
Starting OrientDB server daemon...
*Question 1: Is there a way I can do a manual backup without causing 15
minutes of system downtime for end-users?*
Next issue... Now I have a .zip file backup and I copy it to a new machine
with orientdb 2.0.5 installed. First I create a new local plocal
orientdb> create database plocal:mydb
Creating database [plocal:mydb] using the storage type [plocal]...
Database created successfully.
Current database is: plocal:mydb
orientdb {db=mydb}> restore database orientdb-backup-mydb.zip
Restoring database database orientdb-backup-mydb.zip...
- Uncompressing file OUser.name.sbt...
Error: java.io.IOException: The process cannot access the file because
another process has locked a portion of the file
orientdb {db=mydb}>
*Question 2: What am I doing wrong? The only process locking my db is me.
If I exit my console now I can delete the data directory entirely and
nothing stops me - indicating no other process is locking that file/dir.*
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.