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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| with IBBackupService1 do
begin
options :=[]; //réinitialisation des options
if checkbox1.Checked then
options := options + [IgnoreChecksums];
if checkbox2.Checked then
options := options + [IgnoreLimbo];
if checkbox3.Checked then
options := options + [MetadataOnly];
if checkbox4.Checked then
options := options + [NoGarbageCollection];
if checkbox5.Checked then
options := options + [OldMetadataDesc];
if checkbox6.Checked then
options := options + [NonTransportable];
if checkbox7.Checked then
options := options + [ConvertExtTables];
servername := nomserveur;
databasename := nomchemin(IBBackupService1.servername);
IBBackupService1.BackupFile.clear;
if not checkbox16.Checked then // si pas sauvegarde en morceaux
IBBackupService1.BackupFile.Add(edit1.text) //nom dela sauvegarde
else //sinon decoupe en edit3 morceaux de 4Mo
begin
nomsauve := edit1.text;
nomsauve := StringReplace(nomsauve, '.gbk', '',[]);
for cpt := 1 to strtoint(edit3.Text)-1 do
iBBackupService1.BackupFile.Add(nomsauve+'_'+inttostr(cpt)+'.gbk= 4096000');
IBBackupService1.BackupFile.Add(nomsauve+'_'+edit3.Text+'.gbk');
end;
memo1.Lines.clear; // trace du backup
try
active := true;
verbose := true;
ServiceStart;
while not eof do
Memo1.Lines.Add(GetNextLine);
finally
active := false;
end; |