1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| if FileExists(FichierSave) then exit;
IBBackup := TIBBackupService.Create(nil);
with IBBackup do begin
ServerName := ExtractFilePath(Application.exeName) + 'data\';
//Showmessage(ServerName);
LoginPrompt := False;
Params.Add('user_name=sysdba');
Params.Add('password=masterkey');
Active := True;
try
Verbose := True;
//Options := [NonTransportable, IgnoreLimbo];
DatabaseName := dm1.IBDatabase.DatabaseName;
BackupFile.Clear;
BackupFile.Add(FichierSave);
ServiceStart;
while not Eof do begin
GetNextLine;
//Application.ProcessMessages;
end;
sleep(1000);
finally
Active := False;
BackupFile.Clear;
IBBackup.Free;
end;
end; |
Partager