Subject | Re: [firebird-support] Re: GBAK - Restore Failure from 1.5 on Linux |
---|---|
Author | Alexandre Benson Smith |
Post date | 2007-01-05T02:13:10Z |
Helen Borrie wrote:
I have re-checked it now
look:
C:\Temp>"c:\Program Files\Firebird\Firebird_2_0"\bin\gbak
c:\temp\foo.fdb foo.fbk -user sysdba -password masterkey
C:\Temp>"c:\Program Files\Firebird\Firebird_2_0"\bin\gbak foo.fbk
c:\temp\foo.fdb -r -user sysdba -password masterkey
gbak:opened file foo.fbk
gbak: ERROR:database c:\temp\foo.fdb already exists. To replace it, use
the -REP switch
gbak:Exiting before completion due to errors
as expected -r fails if the file already exists
Note that gbak says to use -REP switch to overwrite the file
C:\Temp>"c:\Program Files\Firebird\Firebird_2_0"\bin\gbak foo.fbk
c:\temp\foo.fdb -rep -user sysdba -password masterkey
gbak:opened file foo.fbk
gbak:transportable backup -- data in XDR format
gbak: backup file is compressed
gbak:created database c:\temp\foo.fdb, page_size 4096 bytes
gbak:started transaction
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user PUBLIC
gbak:creating indexes
gbak: committing metadata
gbak:finishing, closing, and going home
works, as I said on my message
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> Yes, you are missing something. Under Fb 2.0 there is only one wayI think I am missing a lot of things :-))
> to overwrite an existing database (or, in other words, to get the
> same behaviour as gbak -r[eplace_database] in Fb 1.5.x and
> before): you must use
>
> gbak -r[ecreate_database] O[VERWRITE]
>
> That is, gbak -REP now resolves to gbak -c[reate_database] and will
> therefore fail if the database already exists.
>
> ./heLen
>
I have re-checked it now
look:
C:\Temp>"c:\Program Files\Firebird\Firebird_2_0"\bin\gbak
c:\temp\foo.fdb foo.fbk -user sysdba -password masterkey
C:\Temp>"c:\Program Files\Firebird\Firebird_2_0"\bin\gbak foo.fbk
c:\temp\foo.fdb -r -user sysdba -password masterkey
gbak:opened file foo.fbk
gbak: ERROR:database c:\temp\foo.fdb already exists. To replace it, use
the -REP switch
gbak:Exiting before completion due to errors
as expected -r fails if the file already exists
Note that gbak says to use -REP switch to overwrite the file
C:\Temp>"c:\Program Files\Firebird\Firebird_2_0"\bin\gbak foo.fbk
c:\temp\foo.fdb -rep -user sysdba -password masterkey
gbak:opened file foo.fbk
gbak:transportable backup -- data in XDR format
gbak: backup file is compressed
gbak:created database c:\temp\foo.fdb, page_size 4096 bytes
gbak:started transaction
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user SYSDBA
gbak: restoring privilege for user PUBLIC
gbak:creating indexes
gbak: committing metadata
gbak:finishing, closing, and going home
works, as I said on my message
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br