Subject | Re: [firebird-support] How to wipe a database |
---|---|
Author | Norman Dunbar |
Post date | 2011-03-31T08:30:37Z |
Morning Mark,
get a version number for gbak itself and an error exit (exit code 1).
You do *not* get a backup.
If you supply a database name and a backup file, you get the gbak
version plus details about the version and ODS of the named database.
If you have supplied a username and password, or, have defined ISC_USER
and ISC_PASSWORD then you *will* get a backup.
I rather suspect this is a bug myself, but then again, the help for gbak
doesn't say that "-z prints gbak version and exits". Mind you, it also
doesn't say "-z prints gbak version, prints details of the database and
then makes a backup" either! ;-)
I have updated the documents to warn of this and apologise for the loss
of your database. I wrote the manual way back when 1.5 was just a
glimmer in the developers' eyes and I'm almost certain that I didn't end
up with a backup of the database when I was testing and documenting.
I've had a look at the source for 1.5, 2.0, 2.1 and 2.5 and they all
appear to do the same thing, so maybe my last paragraph isn't quite true!
Cheers,
Norman.
--
Norman Dunbar
Dunbar IT Consultants Ltd
Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL
Company Number: 05132767
> I just killed a database, stupid me :( I typed:Yes indeed, I have checked this and found that if you run gbak -z you
> gbak -Z mydb mydb.fdb
> where it should have been:
> gbak -Z mydb mydb.fbk
> According the the documentation of the -Z option:Displays the version
> number of the gbak utility and of the Firebird installation. You must
> supply a valid database name and backup filename - even though the
> backup will not actually be carried out - or the command will exit with
> an error code of 1 rather than zero.
> So this is not true! The -Z option does produce a backup, and in my case
> overwriting the database itself.
get a version number for gbak itself and an error exit (exit code 1).
You do *not* get a backup.
If you supply a database name and a backup file, you get the gbak
version plus details about the version and ODS of the named database.
If you have supplied a username and password, or, have defined ISC_USER
and ISC_PASSWORD then you *will* get a backup.
I rather suspect this is a bug myself, but then again, the help for gbak
doesn't say that "-z prints gbak version and exits". Mind you, it also
doesn't say "-z prints gbak version, prints details of the database and
then makes a backup" either! ;-)
I have updated the documents to warn of this and apologise for the loss
of your database. I wrote the manual way back when 1.5 was just a
glimmer in the developers' eyes and I'm almost certain that I didn't end
up with a backup of the database when I was testing and documenting.
I've had a look at the source for 1.5, 2.0, 2.1 and 2.5 and they all
appear to do the same thing, so maybe my last paragraph isn't quite true!
> Bad day in history (for me).And me, I hate to think that my docs have caused the loss of a database. :-(
Cheers,
Norman.
--
Norman Dunbar
Dunbar IT Consultants Ltd
Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL
Company Number: 05132767