Subject | Re: GBAK error on the running database |
---|---|
Author | Adam |
Post date | 2006-11-15T03:13:38Z |
--- In firebird-support@yahoogroups.com, "Dipesh"
shutdown the service nicely with net stop or whatever, but if you use
step 3 properly you can skip the first two steps.
kill the service and possibly cause issues with other Firebird
applications.
it while the service isn't running. SYSDBA and the owner may still be
connected.
are just restoring it straight away, you might as well save yourself
the effort.
> 1) Stop the database. (killing firebird server)Ouch. Too bad if anyone is doing anything hey? I mean at least
shutdown the service nicely with net stop or whatever, but if you use
step 3 properly you can skip the first two steps.
> 2) Start the database.OK, why do that now?
> 3) gfix shut (forcefully shutting the database)I would have done that first, and if it succeeded there is no need to
kill the service and possibly cause issues with other Firebird
applications.
> 4) Copying the database as repair_myDB.fdbWell if you are going to take a file copy of it, you might as well do
it while the service isn't running. SYSDBA and the owner may still be
connected.
> 5) gfix validate (Validate the copied database)Have you tried the -g option to skip the garbage collection? If you
> 6) gfix mend (Mend the validated database i step5)
> 7) gfix validate (Validate the mended database again)
> 8) gbak validated database from step 7 into my backup location.
> This step creates a backup file but the process gbak in windows is
> running forever and not returning. When i manually run the same
> command i.e. gbak it works perfectly fine and creates a file which is
> larger than the file created by the hanging process.
are just restoring it straight away, you might as well save yourself
the effort.
> 9) gbak restore from the backup file created in step 8Adam
> 10) gfix validate (validate the restored database file)
> 11) stop the database server.
>
> 12) Rename the main database file i..e myDB.fdb to myDB_timestamp.fdb
> 13) Rename my restored file to the same file as it was in step1 i.e.
> myDB.fdb
>
> 13) Restart the database.
>