Subject Re: [firebird-support] gbak: ERROR:unavailable database
Author Mark Rotteveel
On 24-8-2018 05:55, 'Vaughan Wickham' vw@... [firebird-support]
wrote:
>
>
> Hello,
>
> I’m a Firebird newbie.
>
> I’m using: Firebird-3.0.3.32900_0_x64 on Windows 10
>
> Security Gateway uses a Firebird database, I need to enter a large
> amount of config info into its database, which isn’t going to be
> feasible via the SG web portal.
>
> So I’m trying to restore a backup of the database to Firebird, so I can
> update the database “offline” and then restore my updated database to SG.
>
> I have a backup of the SG database on the computer.
>
> I’m trying to perform the rest ore to Firebird with the following command:
>
> gbak -r o -v -user SYSDBA -password masterkey "C:\Program Files
> (x86)\Alt-N Technologies\SecurityGateway\App\sg_backup.fbk"
> "localhost:/C:/Program Files/Firebird/Firebird_3_0/db/SG1.fdb"
>
> Here is the output:
>
> C:\Program Files\Firebird\Firebird_3_0>gbak -r o -v -user SYSDBA
> -password masterkey "C:\Program Files (x86)\Alt-N
> Technologies\SecurityGateway\App\sg_backup.fbk" "localhost:/C:/Program
> Files/Firebird/Firebird_3_0/db/SG1.fdb"
>
> gbak:opened file C:\Program Files (x86)\Alt-N
> Technologies\SecurityGateway\App\sg_backup.fbk
>
> gbak:transportable backup -- data in XDR format
>
> gbak:           backup file is compressed
>
> gbak:backup version is 8
>
> gbak: ERROR:unavailable database
>
> gbak: ERROR:failed to create database localhost:/C:/Program
> Files/Firebird/Firebird_3_0/db/SG1.fdb
>
> gbak:Exiting before completion due to errors
>
> It’s likely that I have stuffed up somewhere, appreciate suggestions on
> how to isolate the mistake.

The database URL you used is incorrect. It should be
"localhost:C:/Program Files/Firebird/Firebird_3_0/db/SG1.fdb" (that is
no / between localhost: and the file path).

The inclusion of that / makes the path /C:/Program
Files/Firebird/Firebird_3_0/db/SG1.fdb which is not a valid file path on
Windows. It looks like you have mixed Linux and Windows style paths.

Technically it would be even better to use "localhost:C:\Program
Files\Firebird\Firebird_3_0\db\SG1.fdb" but Windows (and therefor
Firebird) allows use of / instead of \ as the path separator)

Mark
--
Mark Rotteveel