Subject | Re: [firebird-support] Re: Database compress/purge |
---|---|
Author | Scott Taylor |
Post date | 2003-07-23T22:20:47Z |
At 14:09 07/23/03, you wrote:
take a backup and restore it to another file for use as a dev/test
DB. Works slick, and I've never had any trouble restoring it for the two
years I've been doing it. I think a database would have to be very damaged
to not restore.
Like so:
#!/bin/sh
# <synctest>
wkdir=/opt/databases/Live
tsdir=/opt/databases/Test
bkfile=$tsdir"/test.fbk"
/opt/interbase/bin/gbak -backup -T -USER SYSDBA -PASSWORD foobar
$wkdir/mylive.fdb $bkfile
/opt/interbase/bin/gbak -CREATE -R -V -USER SYSDBA -PASSWORD foobar $bkfile
$tsdir/test.gdb
date
#EOF
I'll change the -R to -C now and see how well that works.
Scott.
>Colin,Exactly. Every morning at 08h00, while the database is at it's busiest, I
>
>C> If it is, we are going to have to have to have a policy of restoring
>C> every backup to make sure all is well... And then do some serious
>C> thinking!
>
>I don't see it as tragic a thing as you seem to do. Just assume that a
>restore on a different file is part of your backup process, just as you
>learned you had to use gbak instead of an operating system file copy.
take a backup and restore it to another file for use as a dev/test
DB. Works slick, and I've never had any trouble restoring it for the two
years I've been doing it. I think a database would have to be very damaged
to not restore.
Like so:
#!/bin/sh
# <synctest>
wkdir=/opt/databases/Live
tsdir=/opt/databases/Test
bkfile=$tsdir"/test.fbk"
/opt/interbase/bin/gbak -backup -T -USER SYSDBA -PASSWORD foobar
$wkdir/mylive.fdb $bkfile
/opt/interbase/bin/gbak -CREATE -R -V -USER SYSDBA -PASSWORD foobar $bkfile
$tsdir/test.gdb
date
#EOF
I'll change the -R to -C now and see how well that works.
Scott.