Backip Superserver/Classic Server

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michaschumann
Posts: 44
Joined: Fri 14 Nov 2014 15:26

Backip Superserver/Classic Server

Post by michaschumann » Sun 11 Jun 2017 16:46

I wrote a migration assistant for my application (currently FB1.5.6) to Firebird 2.5 using TIBCBackupService and TIBCRestoreService. Works great except for environments, where users have installed Firebird 1.5.6 as classic server.

In these cases the "isServiceRunning" loop seems to be left immediately while the GBAK process on the server keeps running. Perhaps I am missing an option or so? This is my backup code, the restore code is analogous. I use a callback as I also use this code in a DLL for Inno Setup.

Code: Select all

procedure backupDB(srcServer, srcDatabase, srcSysdbaPW, aBackupfile, aPort, DLL: String; AcallBack: TUpdateCallBack);
var
  IBCBackupService1: TIBCBackupService;
  cnt: integer;
  s: String;
begin
  IBCBackupService1 := TIBCBackupService.create(nil);
  cnt := 0;
  try
    with IBCBackupService1 do
    begin
      clientlibrary := DLL;
      Database := srcDatabase;
      Server := srcServer;
      Username := 'sysdba';
      Port := aPort;
      Password := srcSysdbaPW;
      Options := [];
      BackupFile.Text := aBackupfile;
      verbose := true;
      Attach;
      try
        ServiceStart;
        while IsServiceRunning do
        begin
          inc(cnt);
          if cnt > PBMAX then
            cnt := 10;
          s := extractForLog(GetNextLine);
          AcallBack(s, cnt, PBMAX);
        end;
      finally
        detach;
      end;
    end;
  finally
    IBCBackupService1.free;
  end;
end;

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Backip Superserver/Classic Server

Post by ViktorV » Wed 14 Jun 2017 10:36

To solve the issue, please try replace in your sample the string

Code: Select all

While IsServiceRunning do
with

Code: Select all

While not Eof do

Post Reply