Subject | RE: [firebird-support] script to recreate database |
---|---|
Author | Yusuf Celik |
Post date | 2007-07-06T15:47:53Z |
1) gbak -b -v -user SYSDBA -pas masterkey fdb.FDB fdb.bkp -y fdb.log
if ERRORLEVEL 1 goto error
2) gbak -r -v -user SYSDBA -pas masterkey fdb.bkp fdb.new -y Log.log
if ERRORLEVEL 1 goto error
3) No idea
4) del fdb.FDB
5) ren fdb.new fdb.fdb
6)No idea
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Puigsegur, Jordi
Sent: Friday, July 06, 2007 4:27 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] script to recreate database
Hi all,
We have a database that under certain circumstances has a lot of free
space due to massive deletions and we would like to be able to recreate
it using gbak so that it occupies less space.
Does anyone have a script (FB 2.0 / Windows 2003 Server) that does the
following:
1) create a backup of the database using gbak
2) restore the backup using gbak on using a new filename (the current
database stays online)
3) shutdown the online database
4) delete old database file
5) rename new database file to correct database filename
6) put the new database online
The idea would be to minimize the downtime. Since the database is big
(two or three Gigs minimum) we cannot replace the database while doing
the restore with the gbak.
Jordi.
[Non-text portions of this message have been removed]
if ERRORLEVEL 1 goto error
2) gbak -r -v -user SYSDBA -pas masterkey fdb.bkp fdb.new -y Log.log
if ERRORLEVEL 1 goto error
3) No idea
4) del fdb.FDB
5) ren fdb.new fdb.fdb
6)No idea
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Puigsegur, Jordi
Sent: Friday, July 06, 2007 4:27 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] script to recreate database
Hi all,
We have a database that under certain circumstances has a lot of free
space due to massive deletions and we would like to be able to recreate
it using gbak so that it occupies less space.
Does anyone have a script (FB 2.0 / Windows 2003 Server) that does the
following:
1) create a backup of the database using gbak
2) restore the backup using gbak on using a new filename (the current
database stays online)
3) shutdown the online database
4) delete old database file
5) rename new database file to correct database filename
6) put the new database online
The idea would be to minimize the downtime. Since the database is big
(two or three Gigs minimum) we cannot replace the database while doing
the restore with the gbak.
Jordi.
[Non-text portions of this message have been removed]