Subject | How to check if Backup succeeded |
---|---|
Author | Falko |
Post date | 2007-11-23T11:30:32Z |
Hi,
I'm using TIBOBackupservice to backup a database.
After backup finished i want to know whether the backup succeeded or not.
So i set verbose=true and check the output for text
'gbak: closing file, committing, and finishing'.
If the text exists the backup was successfull.
But setting verbose to true makes the backup sevaral times slower!!!
( 17s with verbose=false <-> 70s verbose=true with a 100mb database) !!!
Is there another way to check whether the backup succeeded or not
without having verbose set to true?
Same problem with TIBORestoreservice.
Here is my code:
lLog := TStringList.create;
lBackupService := TIBOBackupService.Create(nil);
lBackupService.Params.Add('user_name=SYSDBA');
lBackupService.Params.Add('password=masterke');
lBackupService.LoginPrompt := false;
lBackupService.ServerName := aServer;
lBackupService.Protocol := cpTCP_IP;
lBackupService.Attach();
if lBackupService.Active = true then
begin
lBackupService.Options := [];
lBackupService.Verbose := cbBackupVerbose.Checked;
lBackupService.DatabaseName := apath;
lBackupService.BackupFile.Text := changefileExt(apath,'.gbk');
lLog.beginupdate;
lBackupService.ServiceStart;
while not lBackupService.eof do
lLog.add( lBackupService.getNextline);
lLog.endupdate;
while (lBackupService.IsServiceRunning) do
Application.ProcessMessages;
if lBackupService.Active then
lBackupService.Detach();
Application.ProcessMessages;
end;
...
end;
falko :-)
I'm using TIBOBackupservice to backup a database.
After backup finished i want to know whether the backup succeeded or not.
So i set verbose=true and check the output for text
'gbak: closing file, committing, and finishing'.
If the text exists the backup was successfull.
But setting verbose to true makes the backup sevaral times slower!!!
( 17s with verbose=false <-> 70s verbose=true with a 100mb database) !!!
Is there another way to check whether the backup succeeded or not
without having verbose set to true?
Same problem with TIBORestoreservice.
Here is my code:
lLog := TStringList.create;
lBackupService := TIBOBackupService.Create(nil);
lBackupService.Params.Add('user_name=SYSDBA');
lBackupService.Params.Add('password=masterke');
lBackupService.LoginPrompt := false;
lBackupService.ServerName := aServer;
lBackupService.Protocol := cpTCP_IP;
lBackupService.Attach();
if lBackupService.Active = true then
begin
lBackupService.Options := [];
lBackupService.Verbose := cbBackupVerbose.Checked;
lBackupService.DatabaseName := apath;
lBackupService.BackupFile.Text := changefileExt(apath,'.gbk');
lLog.beginupdate;
lBackupService.ServiceStart;
while not lBackupService.eof do
lLog.add( lBackupService.getNextline);
lLog.endupdate;
while (lBackupService.IsServiceRunning) do
Application.ProcessMessages;
if lBackupService.Active then
lBackupService.Detach();
Application.ProcessMessages;
end;
...
end;
falko :-)