Page 1 of 1

Backup and restore

Posted: Mon 30 Nov 2009 13:26
by flzanini
Hi,

I'm trying to add the backup and restore environments in my application, but I have some doubts:

My application is a Windows Service and I use the Firebird 2.1.3 embbeded. The user configures a schedule to start the backup, and the program can't be closed while the backup is running.

I see that backup and restore components works when I call the StartService method, but don't have events to retrieve the backup state, like OnFinished.

The process run in a separate thread? How I can check if the backup is finished?

Posted: Thu 03 Dec 2009 10:25
by Plash
You can use the IsServiceRunning method to detect if the service is still running.

Posted: Fri 04 Dec 2009 12:28
by flzanini
But if the program is closed while the service is running, an exception occurs

Posted: Fri 04 Dec 2009 13:02
by Plash
Add the following code for the OnClose event of TForm:

Code: Select all

while IBCBackupService.IsServiceRunning do
begin
end;

Posted: Wed 09 Dec 2009 11:48
by flzanini
The service runs in the main thread?

Posted: Thu 10 Dec 2009 08:50
by Plash
The service runs in a thread created by the Firebird server.