nbackup lock working database

74 views
Skip to first unread message

Karol Bieniaszewski

unread,
Mar 22, 2024, 10:53:56 AM3/22/24
to firebird...@googlegroups.com

Hi

 

I try to lock working database (with connected users) for direct file copy but it end with an error:

 

C:\Firebird>nbackup -user SYSDBA -password masterkey -lock C:\Baza_test\RIDO_T.FDB

[

PROBLEM ON "attach database".

I/O error during "CreateFile (open)" operation for file "C:\BAZA_TEST\RIDO_T.FDB"

-Error while trying to open file

-The process cannot access the file because it is being used by another process.

SQLCODE:-902

]

 

 

If i add IP to the database:

 

C:\Firebird>nbackup -user SYSDBA -password masterkey -lock 127.0.0.1:C:\Baza_test\RIDO_T.FDB

[

PROBLEM ON "nbackup needs local access to database file".

SQLCODE:-999

]

 

 

 

What i am doing wrong? How can i lock database and then copy file, unlock it and run fixup on copy?

 

 

Regards,

Karol Bieniaszewski

 

Vlad Khorsun

unread,
Mar 22, 2024, 11:12:05 AM3/22/24
to firebird-support
1. Try  "localhost", not IP, or

2. ALTER DATABASE BEGIN BACKUP; COMMIT; 
copy file
ALTER DATABASE END BACKUP; COMMIT; 

Regards,
Vlad

Karol Bieniaszewski

unread,
Mar 22, 2024, 11:19:38 AM3/22/24
to firebird...@googlegroups.com

Thank you for fast response and golden tim with localhost

and for alternative method with „ALTER DATABASE BEGIN BACKUP; COMMIT; „

 

Regards,

Karol Bieniaszewski

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/f796d948-e5b9-4e55-a5ef-08353186c5e8n%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages