Subject Re: Programmatically using GBAK
Author stefanheymann
> This is the restore statement, I get the error as indicated below.
> c:\Program Files\Firebird\Firebird_1_5\bin\gbak -r -v -user SYSDBA -
> pas masterkey C:\Magus\FBDB\FRED.fbk C:\Magus\FBDB\FRED.fdb
>
> I got this error adding the –y option
> gbak: opened file C:\Magus\FBDB\FRED.fbk
> gbak: ERROR: could not drop database C:\Magus\FBDB\FRED.fdb
(database
> might be in use)
> gbak: Exiting before completion due to errors

Jack, in order to restore over an existing database you must combine
both the -c and -r options.

HTH

Regards, Stefan