Subject Probelm with shadows
Author fabiano_bonin

I'm using shadows for the first time and i'm having a strange problem:

I create a database named '/tmp/a.fdb' and a shadow named '/tmp/a.shd'.

Then i create a backup of this database, named '/tmp/a.fbk'.

When i try to restore '/tmp/a.fbk' to '/tmp/b.fdb', it raises an
error, saying that shadow '/tmp/a.shd' already exists, and it cannot
be overriden.

So i used the option -kill with gbak to restore the database, and here
is the strange thing: this process is deleting the shadow file of the
original database.

Now, when i try to access a.fdb, i have an error because my shadow
doesn't exists anymore (steps to reproduce below).

Am i doing something wrong?



# cd /tmp
# isql a.fdb
# create shadow 1 manual '/tmp/a.shd';
# exit;
# gbak -b a.fdb a.fbk
# gbak -create a.fbk b.fdb
gbak: ERROR: I/O error for file "/tmp/a.shd"
gbak: ERROR: Error while trying to create file
gbak: ERROR: File exists
gbak: Exiting before completion due to errors
# gbak -create -kill a.fbk b.fdb
# isql a.fdb
Statement failed, SQLCODE = -902

I/O error for file "/tmp/a.shd"
-Error while trying to open file
-No such file or directory
-a file in manual shadow 1 is unavailable
Use CONNECT or CREATE DATABASE to specify a database