Subject | Re: [firebird-support] Re: FBKs being left open |
---|---|
Author | Alexandre Benson Smith |
Post date | 2006-04-18T22:14:22Z |
Steve Harp wrote:
Let me ask some questions to understand better your problem.
You do a back-up on a regular time frame (daily, hourly, etc.), so far
so good.
But you said when you need to restore you get the FBK in use, gbak
closes the FBK file as soon as it finishs it's job. So here lies your
problem.
My question is:
Do you do the restore on a regular time frame too ?
To restore the database no one should be using the database (of course
:-) ) this is a regular task that you do ?
If so, why are you restoring it so frequently ?
Another question:
Assuming that you do the back-up and as soon as it terminates you try to
restore it, there is any chance that the process of the back-up are not
finished when you try to delete the old FBK file ?
I do something like this for a back-up routine:
1.) create the fbk using gbak (in LocalA)
2.) zip it (in LocalA)
3.) extract it to another location (localB) to test the ziped file
4.) restore the fbk that is on localB to another location to make sure
the fbk is ok
5.) delete the fbk file that is on LocalB
6.) copy the zip file to a safe location
7.) delete the zip file from LocalA
8.) delete the fbk file that is on LocalA
Using this approach you make sure you have a valid zip and fbk file,
after the test process are finished you remove the garbage (fbk and zip
file) so no fbk file will be anywhere when you need to restore it
I run this script in a cron job (in some sites hourly, in some sites
twice a day, in some sites once a day) and had never encoutered and fbk
file that could not be deleted.
Could you tell us how are you doing your tasks ?
Did you make the back-up using gbak or using the services API ?
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> --- In firebird-support@yahoogroups.com, Steve Wiser <steve@...> wrote:Hi Steve,
>
>> Can you put the database in shutdown?
>>
>
> I don't know how to do this. Are you talking about closing the
> TIBConnection object? What effect would this have on the FBK?
> Remember, my problem is with the FBK; not the FDB.
>
> Steve
>
>
>
Let me ask some questions to understand better your problem.
You do a back-up on a regular time frame (daily, hourly, etc.), so far
so good.
But you said when you need to restore you get the FBK in use, gbak
closes the FBK file as soon as it finishs it's job. So here lies your
problem.
My question is:
Do you do the restore on a regular time frame too ?
To restore the database no one should be using the database (of course
:-) ) this is a regular task that you do ?
If so, why are you restoring it so frequently ?
Another question:
Assuming that you do the back-up and as soon as it terminates you try to
restore it, there is any chance that the process of the back-up are not
finished when you try to delete the old FBK file ?
I do something like this for a back-up routine:
1.) create the fbk using gbak (in LocalA)
2.) zip it (in LocalA)
3.) extract it to another location (localB) to test the ziped file
4.) restore the fbk that is on localB to another location to make sure
the fbk is ok
5.) delete the fbk file that is on LocalB
6.) copy the zip file to a safe location
7.) delete the zip file from LocalA
8.) delete the fbk file that is on LocalA
Using this approach you make sure you have a valid zip and fbk file,
after the test process are finished you remove the garbage (fbk and zip
file) so no fbk file will be anywhere when you need to restore it
I run this script in a cron job (in some sites hourly, in some sites
twice a day, in some sites once a day) and had never encoutered and fbk
file that could not be deleted.
Could you tell us how are you doing your tasks ?
Did you make the back-up using gbak or using the services API ?
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br