para el backup
Código Delphi
[-]
procedure TForm1.BackupClick(Sender: TObject);
begin
with IBBackupService1 do
begin
ServerName :='localhost';
LoginPrompt := False;
Params.Add('user_name=sysdba');
Params.Add('password=masterkey');
Active := True;
try
Verbose := True;
Options := [NonTransportable, IgnoreLimbo];
DatabaseName := edit1.Text;
BackupFile.Add(edit2.Text);
ServiceStart;
While not Eof do
Memo1.Lines.Add(GetNextLine);
finally
Active := False;
end;
end;
end;
para el restore
Código Delphi
[-]
procedure TForm1.RestoreClick(Sender: TObject);
begin
with IBRestoreService1 do
begin
ServerName := 'localhost';
LoginPrompt := False;
Params.Add('user_name=sysdba');
Params.Add('password=masterkey');
Active := True;
try
Verbose := True;
Options := [Replace, UseAllSpace];
PageBuffers := 3000;
PageSize := 4096;
DatabaseName.Add(edit1.Text);
BackupFile.Add(edit2.Text);
ServiceStart;
While not Eof do
Memo1.Lines.Add(GetNextLine);
finally
Active := False;
end;
end;
showmessage('fin');
end;