Re: [firebird-support] nbackup problem : Database is already in the physical backup mode

2015-03-27 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Hi Hugo,

So if the computer is shutdown during a nbackup the database is locked 
in this way indefinelty?




Yes, it's one of the most prevalent problems with nbackup.
To prevent it you need to monitor delta file age and size - manually, or 
automatically using our FBDataGuard tool.





What do you suggest I should do with JayBird when the exception is thrown?
Execute alter database end backup?



Yes, it should merge delta file back to the main database and unlock it.

Regards,
Alexey Kovyazin
IBSurgeon



Re: [firebird-support] nbackup problem : Database is already in the physical backup mode

2015-03-27 Thread hugo.lar...@yahoo.com [firebird-support]
Hello Mark,

So if the computer is shutdown during a nbackup the database is locked in this 
way indefinelty?

What do you suggest I should do with JayBird when the exception is thrown?
Execute alter database end backup?

BR,

Re: [firebird-support] nbackup problem : Database is already in the physical backup mode

2015-03-27 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 27 Mar 2015 01:24:06 -0700, hugo.lar...@yahoo.com [firebird-support]
firebird-support@yahoogroups.com wrote:
 We have a POS application using Firebird 2.5.3 together with JayBird on
 about 300 sites.
 
 The applications runs nbackup several times everyday. It has happened
 several times on several sites that nbackup fails with following
exception:
 org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544351.
 unsuccessful metadata update
 Database is already in the physical backup mode
 
 What happes after this is that all database changes from that point get
 stored in the .delta file.
 
 The soulution i found is to make a full gbak and restore it.

You don't need to restore from a gbak backup, executing ALTER DATABASE END
BACKUP as sysdba (see
http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-ddl-database.html#langrefupd25-alter-db
) should be enough to have the delta file merged back into the database
and ending physical backup mode.

 The is serious nbackup issue which causes problem for the database in
 general.
 The only way to discover this problem is to look after a .delta file or
 attempt another run nbackup again.
 I dont think it's  database corruption or disk problem because it has
 happen too often and everything works fine after the restoring from
gbak.

The  question is whether this is an actual nbackup problem, or if Jaybird
does something wrong with its nbackup implementation causing the backup to
not end correctly. Do you have a reproducible case? Have you checked
whether the previous backup actually ended, or ended correctl?

 I have a copy of such corrupted database if it's interesting.

Not sure if it is: it sounds like the backup mode wasn't completed, and
that is not a corruption.

Mark


Re: [firebird-support] nbackup problem : Database is already in the physical backup mode

2015-03-27 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 27 Mar 2015 02:52:54 -0700, hugo.lar...@yahoo.com [firebird-support]
firebird-support@yahoogroups.com wrote:
 So if the computer is shutdown during a nbackup the database is locked
in
 this way indefinelty?

As far as I know: yes, until you manually end the physical backup mode.
 
 What do you suggest I should do with JayBird when the exception is
thrown?
 Execute alter database end backup?

What if another user has started a nbackup on the same database? It is
risky to just assume that the error is caused by a failed/crashed backup
and then disable the physical backup mode; that could potentially corrupt
the backup by the other user. I'd suggest that executing the alter
database end backup should be an explicit (manually started) action.

Mark