Hola José.
Te pongo un ejemplo de una forma simple en que podrías hacerlo:
Código Delphi
[-]
procedure TForm1.MakeBackup;
const
PATH_BACKUP = 'C:\...\Data\Backup\';
FILE_BACKUP = 'C:\...\Data\BASEDATOS.FDB ';
var
lpOperation, lpFile, lpParameters, lpDirectory: PChar;
Nombre: string;
begin
Nombre:= StringOfChar('0',4-Length(IntToStr(YearOf(Now))))+IntToStr(YearOf(Now)) +
StringOfChar('0',2-Length(IntToStr(MonthOf(Now))))+IntToStr(MonthOf(Now)) +
StringOfChar('0',2-Length(IntToStr(DayOf(Now))))+IntToStr(DayOf(Now))+ '.FBK';
if not FileExists(PATH_BACKUP + Nombre) then
with TPanel.Create(nil) do
try
Caption:= 'Realizando copia de seguridad, aguarde un momento por favor...';
Font.Size:= 14;
Font.Name:= 'Arial';
Width:= 600;
Height:= 70;
Left:= (Self.ClientWidth - Width) div 2;
Top:= (Self.ClientHeight - Height) div 2;
BevelInner:= bvNone;
BevelOuter:= bvNone;
BevelWidth:= 1;
BorderStyle:= bsSingle;
Ctl3D:= False;
Parent:= Self;
lpOperation:= 'open';
lpFile:= 'gbak.exe';
lpParameters:= PChar('-v -t -user SYSDBA -password "masterkey" '+ FILE_BACKUP + PATH_BACKUP + Nombre);
lpDirectory:= PChar(GetEnvironmentVariable('ProgramFiles')+'\Firebird\Firebird_2_5\bin');
ShellExecute(Handle, lpOperation, lpFile, lpParameters, lpDirectory, SW_HIDE);
finally
Free;
end;
end;
Saludos.
Edito: Sin dudas nada tán elaborado como el código de Casimiro. Código que, con su permiso, voy a pasar a echarle una mirada