Subject Re: [ib-support] Re: How take Backup and Restore throu API call
Author Helen Borrie
At 01:16 PM 15-06-02 +0000, Jyotindra Bhoyania wrote:

>I had gone throu the Operation Guide(DataBase Backup and Restore).
>I had Tried it.
>Database(Test.gdb) is on the Server,Where i what take Backup and
>Restore (same machince).
>gbak [-B] [options] database target
>Now I have a DataBase in C:\Programe Files\Firebird\Test.gdb and
>C:\Programe Files\Firebird\Test.gbk.
>Now I want to take backup from command prompt.

That is different to running backup and restore through the API
(application programming interface).

To run a backup from the command line, do this:

Go to the directory where the gbak.exe program is:
> cd Program Files\Firebird\bin
> gbak -b "C:\Programe Files\\Firebird\Test.gdb" "C:\Programe
Files\Firebird\Test.gbk" -user sysdba -password masterkey

In DOS, paths have to be double-quoted if they include spaces.

Then, for restoring over an existing db file:
> gbak -r "C:\Programe Files\\Firebird\Test.gbk" "C:\Programe
Files\Firebird\Test.gdb" -user sysdba -password masterkey

Or, for restoring to a new db file:
> gbak -c "C:\Programe Files\\Firebird\Test.gbk" "C:\Programe
Files\Firebird\Test1.gdb " -page_size 8192 -user sysdba -password masterkey


>I had tried the following systax.
>gbak -b -user SYSDBA -pa masterkey Test.gdb Test.gbk;
>
>It give following error Excepted page size ,encountered "masterkey"
>
>gbak -b -user SYSDBA -pa masterkey Test.gdb 590k Test.gbk 590k;
>
>It give following error Excepted page size ,encountered "masterkey"

Are you sure you didn't get this message on gbak -c[reate] ? It's not
expecting a page_size on the -b[ackup] switch nor on the -r[estore] switch..

>I had tried -se option also
>I had give full path.
>But it is give me error.

Possibly to do with the space in your pathname...

It's not a very great idea to locate your databases in the server
directory, anyway. To keep things tidy, create some space somewhere on
your system, with a simple name, e.g. \data\ to hold databases. Make
backups to a different space, e.g. a directory called \gbk\.

heLen

>--- In ib-support@y..., Helen Borrie <helebor@t...> wrote:
> > At 06:04 AM 15-06-02 +0000, Jyotindra Bhoyania wrote:
> > >Hello Friends,
> > >
> > >I what to take Backup and Restore throu API call.
> > >Now what are the step.
> > >
> > >gbak -create -mode read_only old_database.gbk new_database.gdb
> > >gfix -mode read_only database.gdb
> > >
> > >I had tried like this for example
> > >gbak -create -mode read_only
> > >'C:\Program Files\Firebird\Examples\V5\employee.gbk'
> > >'C:\Program Files\Firebird\bin\jbb1.gdb';
> > >
> > >But it is give me error.
> > >Now I do not about the parameter and how to give the Parameter.
> > >If Some can help me.
> > >I am Stuck.
> >
> > If you are doing it through the Services API it's no good trying to
>call
> > gbak from your application. Get hold of the APIGuide.pdf manual
>and follow
> > the instructions there for using the Services API.
> >
> > heLen
> >
> > All for Open and Open for All
> > Firebird Open SQL Database · http://firebirdsql.org ·
> > http://users.tpg.com.au/helebor/
> > _______________________________________________________
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________