Cannot do backup - can't connect to database using plocal protocol

634 views
Skip to first unread message

Scott Dunbar

unread,
Jan 29, 2016, 7:45:06 PM1/29/16
to OrientDB
I've seen several topics like this online but no resolution.  I'm trying to backup a 2.0.9 database under Max OS/X 10.10.5, Java 1.8.0_66.  I have done:

1) Connect to database using remote protocol:

orientdb> connect remote:localhost/dbname root password
Connecting to database [remote:localhost/dbname] with user 'root'...OK

2) Connect to database using plocal protocol with the server running:

orientdb> connect plocal:../databases/dbname root password
Connecting to database [plocal:../databases/dbname] with user 'root'...
Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage '../databases/dbname' 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 '../databases/dbname/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.

3) Connect to database with plocal protocol without the server running:
orientdb> connect plocal:../databases/dbname root password

Connecting to database [plocal:../databases/dbname] with user 'root'...
Error: com.orientechnologies.orient.core.exception.OSecurityAccessException: User or password not valid for database: 'dbname'

4) Ok, use the backup.sh script instead:

$ ./backup.sh  plocal:../databases/dbname root password /tmp/blah.zip


Error: com.orientechnologies.orient.core.exception.OSecurityAccessException: User or password not valid for database: 'dbname'


In short, is there no way to do a database backup? 

scott molinari

unread,
Jan 30, 2016, 3:08:36 AM1/30/16
to orient-...@googlegroups.com
Did you try to connect through remote like this?

CONNECT remote:127.0.0.1/dbname admin password

Usually the password will be admin and not root too.

Scott

scott molinari

unread,
Jan 30, 2016, 3:11:49 AM1/30/16
to OrientDB
Ah, and if you are on your own computer for testing purposes, you could simply copy the "/database" directory somewhere else as a backup. If you build up a new server (with the same or compatible version) somewhere else, you can then simply copy in your backup "/database" directory into the new server root directory and your databases are back again. 

Scott

Roberto Franchini

unread,
Jan 30, 2016, 4:43:56 AM1/30/16
to orient-...@googlegroups.com
On Fri, Jan 29, 2016 at 10:14 PM, Scott Dunbar <sc...@xigole.com> wrote:
> I've seen several topics like this online but no resolution. I'm trying to
> backup a 2.0.9 database under Max OS/X 10.10.5, Java 1.8.0_66. I have done:
>
> 1) Connect to database using remote protocol:
>
> orientdb> connect remote:localhost/dbname root password
> Connecting to database [remote:localhost/dbname] with user 'root'...OK
>
> 2) Connect to database using plocal protocol with the server running:
[cut]

> database is in use by another process. Use the remote mode with a OrientDB
> server to allow multiple access to the same database.

As stated by the message, you can't open a database in plocal while
another process (the server) is working on it.
Only one process a time could handle the db: it locks the db.
For the same reason you can't open TWO times a db in plocal.

>
> 3) Connect to database with plocal protocol without the server running:
> orientdb> connect plocal:../databases/dbname root password
>
> Connecting to database [plocal:../databases/dbname] with user 'root'...
> Error: com.orientechnologies.orient.core.exception.OSecurityAccessException:
> User or password not valid for database: 'dbname'
>

You should use the uname and password for the db, not the uname and
password for the server.
Usually, without taking care about security, they are admin/admin.


> 4) Ok, use the backup.sh script instead:
>
> $ ./backup.sh plocal:../databases/dbname root password /tmp/blah.zip
>
>
> Error: com.orientechnologies.orient.core.exception.OSecurityAccessException:
> User or password not valid for database: 'dbname'

Same as above: wrong credentials.

If you find the docs incomplete about credentials/security and or
backup procedures, please point me to the page and I will take care of
improve it


--
Best regards,

Roberto Franchini

OrientDB LTD - http://orientdb.com

Scott Dunbar

unread,
Feb 1, 2016, 12:26:41 PM2/1/16
to OrientDB
I had not seen that there are two levels of users - thanks for that information.  It is working now that I'm using the database credentials and not the server credentials.

Thanks.
Reply all
Reply to author
Forward
0 new messages