Bläddra i källkod

Backup/restore: add support for zip files (.fbk.zip) for better compression. Currently only supports .fbk.zip files with one file.

Reinier Olislagers 11 år sedan
förälder
incheckning
768091d7f3
4 ändrade filer med 399 tillägg och 305 borttagningar
  1. 24 22
      backuprestore.lfm
  2. 261 259
      backuprestore.lrs
  3. 90 5
      backuprestore.pas
  4. 24 19
      unitfirebirdservices.pas

+ 24 - 22
backuprestore.lfm

@@ -1,10 +1,10 @@
 object fmBackupRestore: TfmBackupRestore
   Left = 402
-  Height = 550
-  Top = 154
+  Height = 445
+  Top = 201
   Width = 496
   Caption = 'Backup/Restore database'
-  ClientHeight = 550
+  ClientHeight = 445
   ClientWidth = 496
   Position = poScreenCenter
   LCLVersion = '1.2.2.0'
@@ -22,7 +22,7 @@ object fmBackupRestore: TfmBackupRestore
     object Label1: TLabel
       Left = 12
       Height = 13
-      Top = 10
+      Top = 6
       Width = 75
       Caption = 'Operation Type'
       ParentColor = False
@@ -43,9 +43,9 @@ object fmBackupRestore: TfmBackupRestore
       Text = 'Backup'
     end
     object Label2: TLabel
-      Left = 13
+      Left = 12
       Height = 13
-      Top = 89
+      Top = 86
       Width = 93
       Caption = 'Targeted Database'
       ParentColor = False
@@ -53,7 +53,7 @@ object fmBackupRestore: TfmBackupRestore
     object Label3: TLabel
       Left = 14
       Height = 13
-      Top = 142
+      Top = 137
       Width = 53
       Caption = 'Backup File'
       ParentColor = False
@@ -67,17 +67,18 @@ object fmBackupRestore: TfmBackupRestore
       TabOrder = 3
     end
     object SpeedButton1: TSpeedButton
-      Left = 421
+      Left = 416
       Height = 22
-      Top = 142
+      Top = 133
       Width = 23
       Anchors = [akTop, akRight]
+      Caption = '...'
       OnClick = SpeedButton1Click
     end
     object bbStart: TBitBtn
       Left = 354
       Height = 40
-      Top = 224
+      Top = 257
       Width = 131
       Caption = 'Start'
       Color = 16249563
@@ -95,17 +96,18 @@ object fmBackupRestore: TfmBackupRestore
       TabOrder = 2
     end
     object sbBrowseTargetdb: TSpeedButton
-      Left = 421
+      Left = 416
       Height = 22
-      Top = 91
+      Top = 85
       Width = 23
       Anchors = [akTop, akRight]
+      Caption = '...'
       OnClick = sbBrowseTargetdbClick
     end
     object Label4: TLabel
       Left = 14
       Height = 13
-      Top = 177
+      Top = 176
       Width = 51
       Caption = 'User name'
       ParentColor = False
@@ -113,14 +115,14 @@ object fmBackupRestore: TfmBackupRestore
     object edUserName: TEdit
       Left = 102
       Height = 21
-      Top = 177
+      Top = 176
       Width = 145
       TabOrder = 4
     end
     object Label5: TLabel
-      Left = 13
+      Left = 12
       Height = 13
-      Top = 217
+      Top = 216
       Width = 46
       Caption = 'Password'
       ParentColor = False
@@ -128,7 +130,7 @@ object fmBackupRestore: TfmBackupRestore
     object edPassword: TEdit
       Left = 102
       Height = 21
-      Top = 209
+      Top = 216
       Width = 145
       EchoMode = emPassword
       PasswordChar = '-'
@@ -137,7 +139,7 @@ object fmBackupRestore: TfmBackupRestore
     object Label6: TLabel
       Left = 14
       Height = 13
-      Top = 51
+      Top = 48
       Width = 22
       Caption = 'Host'
       ParentColor = False
@@ -152,9 +154,9 @@ object fmBackupRestore: TfmBackupRestore
       TabOrder = 1
     end
     object Image1: TImage
-      Left = 406
+      Left = 408
       Height = 76
-      Top = 10
+      Top = 0
       Width = 79
       Picture.Data = {
         1754506F727461626C654E6574776F726B477261706869638A14000089504E47
@@ -328,8 +330,8 @@ object fmBackupRestore: TfmBackupRestore
   end
   object meLog: TMemo
     Left = 4
-    Height = 149
-    Top = 292
+    Height = 109
+    Top = 332
     Width = 488
     Align = alClient
     BorderSpacing.Left = 2

+ 261 - 259
backuprestore.lrs

@@ -2,264 +2,266 @@
 
 LazarusResources.Add('TfmBackupRestore','FORMDATA',[
   'TPF0'#16'TfmBackupRestore'#15'fmBackupRestore'#4'Left'#3#146#1#6'Height'#3
-  +#189#1#3'Top'#3#201#0#5'Width'#3#240#1#7'Caption'#6#22'Backup/Resore databas'
-  +'e'#12'ClientHeight'#3#189#1#11'ClientWidth'#3#240#1#8'Position'#7#14'poScre'
-  +'enCenter'#10'LCLVersion'#6#7'1.2.2.0'#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2
-  +#0#6'Height'#3' '#1#3'Top'#2#0#5'Width'#3#240#1#5'Align'#7#5'alTop'#12'Clien'
-  +'tHeight'#3#14#1#11'ClientWidth'#3#236#1#5'Color'#7#7'clWhite'#11'ParentColo'
+  +#189#1#3'Top'#3#201#0#5'Width'#3#240#1#7'Caption'#6#23'Backup/Restore databa'
+  +'se'#12'ClientHeight'#3#189#1#11'ClientWidth'#3#240#1#8'Position'#7#14'poScr'
+  +'eenCenter'#10'LCLVersion'#6#7'1.2.2.0'#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2
+  +#0#6'Height'#3'H'#1#3'Top'#2#0#5'Width'#3#240#1#5'Align'#7#5'alTop'#12'Clien'
+  +'tHeight'#3'6'#1#11'ClientWidth'#3#236#1#5'Color'#7#7'clWhite'#11'ParentColo'
   +'r'#8#8'TabOrder'#2#0#0#6'TLabel'#6'Label1'#4'Left'#2#12#6'Height'#2#13#3'To'
-  +'p'#2#10#5'Width'#2'K'#7'Caption'#6#14'Operation Type'#11'ParentColor'#8#0#0
-  +#9'TComboBox'#11'cbOperation'#4'Left'#3#142#0#6'Height'#2#21#3'Top'#2#6#5'Wi'
-  +'dth'#3#204#0#10'ItemHeight'#2#13#9'ItemIndex'#2#0#13'Items.Strings'#1#6#6'B'
-  +'ackup'#6#7'Restore'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#4'Text'
-  +#6#6'Backup'#0#0#6'TLabel'#6'Label2'#4'Left'#2#13#6'Height'#2#13#3'Top'#2'Y'
-  +#5'Width'#2']'#7'Caption'#6#17'Targeted Database'#11'ParentColor'#8#0#0#6'TL'
-  +'abel'#6'Label3'#4'Left'#2#14#6'Height'#2#13#3'Top'#3#142#0#5'Width'#2'5'#7
-  +'Caption'#6#11'Backup File'#11'ParentColor'#8#0#0#5'TEdit'#8'edBackup'#4'Lef'
-  +'t'#2'f'#6'Height'#2#21#3'Top'#3#137#0#5'Width'#3'1'#1#7'Anchors'#11#5'akTop'
-  +#6'akLeft'#7'akRight'#0#8'TabOrder'#2#3#0#0#12'TSpeedButton'#12'SpeedButton1'
-  +#4'Left'#3#165#1#6'Height'#2#22#3'Top'#3#142#0#5'Width'#2#23#7'Anchors'#11#5
-  +'akTop'#7'akRight'#0#7'OnClick'#7#17'SpeedButton1Click'#0#0#7'TBitBtn'#7'bbS'
-  +'tart'#4'Left'#3'b'#1#6'Height'#2'('#3'Top'#3#224#0#5'Width'#3#131#0#7'Capti'
-  +'on'#6#5'Start'#5'Color'#4#219#242#247#0#4'Kind'#7#5'bkAll'#7'OnClick'#7#12
-  +'bbStartClick'#8'TabOrder'#2#6#0#0#5'TEdit'#16'edTargetDatabase'#4'Left'#3
-  +#142#0#6'Height'#2#21#3'Top'#2'V'#5'Width'#3#8#1#7'Anchors'#11#5'akTop'#6'ak'
-  +'Left'#7'akRight'#0#14'ParentBidiMode'#8#8'TabOrder'#2#2#0#0#12'TSpeedButton'
-  +#16'sbBrowseTargetdb'#4'Left'#3#165#1#6'Height'#2#22#3'Top'#2'['#5'Width'#2
-  +#23#7'Anchors'#11#5'akTop'#7'akRight'#0#7'OnClick'#7#21'sbBrowseTargetdbClic'
-  +'k'#0#0#6'TLabel'#6'Label4'#4'Left'#2#14#6'Height'#2#13#3'Top'#3#177#0#5'Wid'
-  +'th'#2'3'#7'Caption'#6#9'User name'#11'ParentColor'#8#0#0#5'TEdit'#10'edUser'
-  +'Name'#4'Left'#2'f'#6'Height'#2#21#3'Top'#3#177#0#5'Width'#3#145#0#8'TabOrde'
-  +'r'#2#4#0#0#6'TLabel'#6'Label5'#4'Left'#2#13#6'Height'#2#13#3'Top'#3#217#0#5
-  +'Width'#2'.'#7'Caption'#6#8'Password'#11'ParentColor'#8#0#0#5'TEdit'#10'edPa'
-  +'ssword'#4'Left'#2'f'#6'Height'#2#21#3'Top'#3#209#0#5'Width'#3#145#0#8'EchoM'
-  +'ode'#7#10'emPassword'#12'PasswordChar'#6#1'-'#8'TabOrder'#2#5#0#0#6'TLabel'
-  +#6'Label6'#4'Left'#2#14#6'Height'#2#13#3'Top'#2'3'#5'Width'#2#22#7'Caption'#6
-  +#4'Host'#11'ParentColor'#8#0#0#5'TEdit'#6'edHost'#4'Left'#3#142#0#6'Height'#2
-  +#21#3'Top'#2'0'#5'Width'#3#6#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0
-  +#14'ParentBidiMode'#8#8'TabOrder'#2#1#0#0#6'TImage'#6'Image1'#4'Left'#3#150#1
-  +#6'Height'#2'L'#3'Top'#2#10#5'Width'#2'O'#12'Picture.Data'#10#166#20#0#0#23
-  +'TPortableNetworkGraphic'#138#20#0#0#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0
-  +#0'H'#0#0#0'H'#8#6#0#0#0'U'#237#179'G'#0#0#0#4'sBIT'#8#8#8#8'|'#8'd'#136#0#0
-  +#0#9'pHYs'#0#0#15#146#0#0#15#146#1#4#168'~'#160#0#0#0#25'tEXtSoftware'#0'www'
-  +'.inkscape.org'#155#238'<'#26#0#0#0#25'tEXtTitle'#0'DataBase (2 Blocks)ne'
-  +#254#165#0#0#0#24'tEXtAuthor'#0'Jean-Victor Balin'#236'J'#17'L'#0#0#0'''tEXt'
-  +'Description'#0'[email protected]'#216#218#231'Q'#0#0#0#24'tEXtCre'
-  +'ation Time'#0'2009-11-09b%w,'#0#0#0'ItEXtCopyright'#0'Public Domain http://'
-  +'creativecommons.org/licenses/publicdomain/Y'#195#254#202#0#0#19#18'IDATx'
-  +#156#237'\[l\'#215'u]'#251#156's'#31#243' 9'#148'8|'#201#146'('#217#150#31
-  +#138#31'q\'#191#146'8J'#147#166'V'#13#168'I]'#165#8#144#254#4#133#209'~'#20
-  +'H'#220'&'#1#250#209#140#16#160'('#250#213#244#171'-'#242'B'#2'''m'#245#19
-  +#164'i'#131#166#142#205'8~6'#150#237#216#154#216#150#173'GD'#153#20'9$g'#200
-  +'y'#221#199'9{'#247'c'#134#20')Q'#145'-'#139#164'>'#178#128#11#14'f'#238#229
-  +#217'w'#205#222#251#156#189#206#190'C"'#130#223#226#226'P'#155'm'#192#213#142
-  +#223#18't'#9#152#203#189#240#200#145'''>'#208#138#232'o'#172#179#187#156#181
-  +#131#214#185'^v.t'#206#25#199#142#156'c0;q'#214'9'#235'\'#228#156#173';'#230
-  +#138#136#156#18#197'_'#251#179'?'#253#243#199#175#228#141#172#23'h'#173#28'D'
-  +'D'#4#0#165'R'#137'V'#190#255#208'C'#7'nu"'#255#20''''#209#221#173'V'#203'w'
-  +#206#129#153#225#152#193#29'B'#192#204#157#247#28'/'#191'fv`'#215'='#175'{'
-  +#164#137#181'Z'#211#203'a&x'#228#248#177#211'O'#175#28#167'T*'#9#0#200'U'#144
-  +' '#215'"'#136'>'#253#233'O'#171'J'#165'B{'#246#236'!'#0#248#171'/}'#225'['
-  +#237#168'y'#176#213'l'#249#214#185#229#27'^&'#227'2'#8'Z:'#191#243#158#164
-  +#185'\'#246''''#245'Z'#235#161#163'G'#143#242#177'c'#199#164'X,'#202#222#189
-  +'{'#165'T*'#201'f'#18#181#28'bDD"'#192#161'C%'#221'h4'#244#216#216#24'}'#230
-  +'3'#127'4'#186'm'#251#206#23'j'#139#213'~'#231#28#214#207'N'#241#234#139#245
-  +#7#181'G'#243#31#254#240'='#247'''IR'#158#158#158#22#0#174'T*1'#17'm'#154'7'
-  ,#173'L'#210't'#232#208'>].'#151#189'|>'#239'}'#241#203'_xxx'#219'5o.'#212'k'
-  +#253#27'e['#154#186'le~'#238#23#31#253#216'G'#14#229#243'y'#175'\.{'#147#147
-  +#147#26#0']'#242#226'u'#130#2':'#222#179'o'#223'>U.'#23'='#223#247#189#191
-  +#251#251#175#254#3#8'_k'#181'['#27'?'#203#9'h'#166'r'#246'K'#15#30'x'#224#223
-  +#1#248'SSS'#222#190'}'#251#212'R^'#220'h('#160#147#140#139#197#162#242#253
-  +#134#247#217#207#254#201'M'#218#152#191'Hm'#186#25#246'tA'#152#153#158#254
-  +#131#223'{'#240'c'#251#195'0'#244'2'#153#140'>'#127#194#216'(('#0'('#151#203
-  +#4'@'#183't'#232#237#185#241#166#175'Fq{3lY'#5'a@'#129#254#22#128'?00`'#202
-  +#229'2m'#134#23')"'#162'J'#165'B'#0#180'i'#27'/'#240#131#27#157#179#27'm'#199
-  +#133'  '#137#147#237'Zk'#143#153'u'#127#127#255#166',j'#21#0't'#167's'#173'u'
-  +#226#137#176'g'#244'e'#175#31#175#28#4#208'Zk'#231#156#17#17']'#173'V7/'#196
-  +#170#213'*y'#158#167#156#243'M;'#142#26#153'0'#187#25#182#172#130#0'('#244
-  +#245#198#236#177#169'K]7'#26#13#194'&'#204'f'#203'nk'#140'Q'#204'l'#22#23'k'
-  +#149'L'#152#133#231#249#27'm'#203'2'#4#128#239'{'#216#181'{'#215#162'q'#198
-  +#152#200#168#161#161'!*'#149'J'#27'n'#139#2#128'F'#163'A'#245'z]'#251'>4'#139
-  +'Cmq'#14#197'-E'#228#178#185#13'7'#136#153#161#136'p'#251#251'o'#131#231'y'
-  +#194#204#198#24#163#154#205#230#230#133#216#208'P'#155#150'<H'#4'*IST'#230'+'
-  +#232#205#247'ap'#235' 6b'#242#16#1#210'4EO>'#143#251#239#255'0'#138#131'E'#8
-  +'@l'#216'h'#173'U'#20'E'#155'CP'#169#4#2#198#160'u'#172#152#141#17#17#2#0'f'
-  +#135#185'Z'#5','#130#237#163';'#208#155#239#133'R'#235'0'#145#8'`S'#139'8'
-  +#142'0'#182'k'''#238#253#208#189#200'd3'#221#207#132#12#139'It'#178'i'#178
-  +#140#1'Jh6'#203#132'L@hC'#139#200'*c'#26#173':'#162'8B&'#147#197#150#254'"'
-  +#226#184#141#249#234#28#22#235#11'`'#190#188'AE'#4'I'#146' '#142'"'#16#17#134
-  +'F'#134#177'}'#199'v'#20#10'}k'#157#174#181#214'*W'#200'm'#138#7#25#0#136#162
-  +#136'r:'#167'R'#157'.{'#208'JX'#151#162#181#208#196#217#153')'#24'e'#16#134
-  +#25'\3'#178#29'Q'#20#161#29#181#17''''#9#226'8'#134#181')'#210'4'#133#176#128
-  +#168'3'#229#136#8#156'c'#216'$E'#146'Z$I'#140'8NP'#216'R'#192#142#157#219#177
-  +'u`'#0'a'#24#192#243#188#11#140#19#128'Xi'#131'6t'#132#136#186#11'Z'#0#192
-  +#225#195#135'}'#223'W'#247'Y'#182#247'8''{Y\'#209'YwR'#156'{9'#129'<'#253#185
-  +#207'~'#238#232#21'#'#168#131'HkV'#6#151#152'J['#237#22#170#181'*'#226'8'#134
-  +'0 '#194#16#22'8'#22#8'3'#4#2#128#224#172'E'#156#196'p'#214#130#1'h'#165#144
-  +#201#4'('#20'z'#145#205#229#16#4'>'#130' X'#149#223#206'/'#138#133#153#152
-  +#217#251#196#199'?q'#237'-'#183#221#252'M'#231#220']O<'#249'Xhm'#170#242'}!'
-  +#152#25#196#10#218'1'#152'5'#216't'#228#22#237#24#143'~'#255';p'#206#138's'
-  +#142#173#181'5'#173#244#191'-'#212#154'_|'#228#145'G'#162#181#238#235'bj'#1
-  +#149'J%u'#252#248'3'#153#150#235#25'R)o'#255#252'_'#127#254#31'{{{o?'#255#196
-  +#164#235'%I'#220#249#219'9'#150#222';'#247':'#142#227#229#27#213'Z#'#8'|'#248
-  +'A'#128' '#8#150'I'#241#253#21#175#131#0#190#239#157#243#160#174#153#4#2'C'
-  +#226'4I'#169#221'n'#249#214#218'sz'#146'skhQ'#231#244#168#213'Z'#212#185#243
-  +'Sk'#161'@s^'#232#127#175#150#169#127#249#217#255'x6'#1#128#189'{'#247#10#208
-  +#17#234#206'''J'#1'@'#20#245#145'J'#149#2#140'^+'#196#214#11'"'#178'L'#166
-  +#136'tnF'#24'A'#16#160#21#181#209'h'#212#131'v'#212#242#249'r'#147#221'yPJ'
-  +#129'!['#219#205#246'_'#154'ij=x'#224#129#239'6'#26#13'S.'#151#205#228#228
-  +#164'>x'#240#224#5#170#193'rBff'#18'%FdcV'#171#29'b'#168#147#163#216#193'9'#7
-  +#173#21'B?'#196#194#194#2#174#20')'#23#3#17#161'V'#173'}'#230#192#167#30'<u'
-  +#207'='#247#12'OMMy'#141'F'#195#236#219#183'O'#175'$I'#1'@'#28#199#164#148'R'
-  +'"b'#206#159#197#214#19'"'#231'B"'#147#201#130#160#208'h56jx'#16#1#237'V{X'
-  +#25'9'#241#169#131#127#248#169'|>'#239#141#141#141#153#149#158#164#202#229'2'
-  +#245#244#164#164#148'U'#26#208#192#198#133#24#179#192'9'#135#158'\'#15'D'#24
-  +'I'#154'l'#212#208#171#224#156#211's'#149#217#239#222#255#187#247#221':'#175
-  +#230#189'F'#163'a'#150#244#167#174#183'l'#129'UJ'#137#18#147#203#230#139#235
-  +'m'#208'R'#238'af'#16#128#158'|'#15#146'ds'#200'Ya'#19#5'~'#240#189#130#213
-  +#254#192#192#128#25#31#31'WDD'#10#0#146'$!e;!'#22#134#235'_'#202'wEx0'#11#194
-  +'0'#3'k'#175#2#253#9#192'BmqG6'#219#27'FQd'#138#197#162#18'Y'#145#164#173#178
-  +#10#208#218#15'|'#189#222#134't'#18#180'@'#216'!'#147#201't'#215'N'#155#15
-  +#231#28#237'}'#255#157#31#200'd'#172#201#229'r'#234#208#161'R'#199#131#210'\'
-  +'J'#138#148'R"'#198#165#220#170#215#215'?Q2w<(I'#18#248'f'#243#164#149#149
-  +#240#140'F6'#212'q'#154':377'#167#128#174#7'e'#147',)'#215#201'A'#11#139#213
-  +'f'#127'O?fg'#231#214#205#144'%'#15'b'#17#180#219'm'#132'a'#6'Z'#175#187#227
-  +'^'#202'('#20#135#135#225','#148#8't'#161'P'#160'r'#185'L'#203'!'#166#148'S"'
-  +'0'#205'V3'#205#230#179#128#3#202'G'#127'u'#197'7'#11#207'-'#12#151#22#135#14
-  +#139#141#26#182#22#138'PjsH'#18#17'('#163'p'#211#205'7B'#196'j'#173#205#178
-  +#188#210#9#177'4%K'#164#0#165'E@'#139#141#5#140#237#26#195'-{o'#195'SO>'#139
-  +'v{'#205#242#229#178'A'#157'*'#22#204#12#17#160#29#181#209#142'['#24#25#28'E'
-  ,#224#135'Wt'#172'K'#193'9'#135'0'#12'q'#239#189#247'!'#12#2'$'#137'5"'#208'='
-  +'=q'#135#160'J'#165'B'#214'ZR'#174#147#131#208'](6Zuh'#159#240#201#3#7#240
-  +#203#151'^'#197#143#255#251'''8~'#226'$'#156's'#239#217'('#17#130't'#141'[\X'
-  +#0#0#180#218'M'#204#215#230'P'#220':'#136#254#190#254#247'<'#198#165'm'#16'$'
-  +'q'#130#161#225'!|'#232#254#15#162#183#175#7#0#224'DL'#12#210#245'z'#160'*'
-  +#149#10'u'#170#249#30#128'"'#167#132#200#200#138#133'b'#154'&'#168#214#231
-  +#177#255#129#223'G'#163#209#198#145#23'_'#192#143#254#235#127'@D'#216#185#227
-  +#26#20#7#6#222#181'a'#214'ZTf'#231'q'#250#244#175'Q'#169#204#225#174';'#239
-  +#192#174'kwu>s)f'#231'g'#208#215'['#192'Xn'#12#139#141'E'#212#22'k'#136#218
-  +'Wn'#159#206#166#22'I'#146'@'#4#184#249#150#189#216#177'c'#251#234#19#216'i'
-  +#0':MS'#2#186'rG'#152'ZJU'#160#192'lp^-'#198#204#168'.'#206#195'Z'#139#219'o'
-  +#191#5#31#188#239'^T'#171'5<'#251#236#243#248#233#227'O'#162'Z'#237'H'#31#218
-  +#243#17#248#30#140'1'#8#195#16'Z'#17#146#212'.kDIj'#161#9#240'}'#31'['#182
-  +#244'cK'#127'?'#246'\'#127'-'#134#135#135'W'#217''''#16#212#22#171'`'#22#248
-  +'&'#192#200#224#8'D'#4#213#133'*'#22#22#23#17#199#239'.'#220';'#226'\'#138'('
-  +'j'#195'Z'#135'-['#183#224#250#209#235'02:'#178#166'Bj'#25'F'#165'J'#5#217
-  +#136'j'#181'.A'#214#134'D'#198'*'#1'i'#193#218#181#24'3c'#161#190#128#202'l'
-  +#5'6'#181#184#245#182#189#184#243#206#247'w'#166'kg'#209'h4P'#173'-bnn'#14's'
-  +#213'*'#152#29'2a'#216#17#195#140#7'mT'#167#0'%A'#224#7#232#237#237#131'@'
-  +#144#201#174#189'.evX'#168#215'P'#153#157#134#181#14#153'0'#131#222'\/$'#215
-  +#3'g'#25#206#166#136#146#24'I'#18'#IRXk!]M'#202'Z'#135'4N'#144#218#4#206'2'
-  +#180#209#24#29#29#197'@q'#0'a'#24#194#15#252#139#202#199#188#236'AY'#218#183
-  +#175#185#162#253#197#145'"'#165'.'#240#160#181#224#216'a'#190':w'#129#30#212
-  +'q]F'#161'7'#7#233#222'$'#17#131'4'#224#249'^G'#27#242'}x'#158#15'aF'#146#166
-  +#16#185't'#213#238#156#197#220#252'lg'#140#174#230#148'$iw-'#213#217#5#129#2
-  +'lb'#1#2#180#209#240'}'#31#249'|~'#149#22#245'N6'#31#152#217#0#208#145#137
-  +#212#228#228#30#234'z'#144'%'#29'h'#165#128#247#164#7#137#8#226'8Y%'#152')u'
-  +#225'"PD'#0#18#136'0'#248'2'#151#17#157#208#233#144#181'4q'#16'Q'#199';'#244
-  +#229#11#18'b'#157#1'R'#29#218'pE'#177#154#7#136'\G'#238#184'H'#136']i'#136't'
-  +#234'1l~'#151#221'*'#184#174#7'Yk'#187#4#237#3'B'#27#18'9'#165#132#228#29#133
-  +#216#149#129'@'#186#229#198#213#4#6#180'RJ'#133#161#163'j'#181'Jj'#207'd'#157
-  +#172#181'$Z'#145#234'$'#233#13'R'#20#187#206's'#149'y'#16#220#146#7#5#29#15
-  +#26#29#237#17'c'#226'nW)'#212#134'y'#144#8#248'='#228#160#245#130#19'1"'#208
-  +'.p'#29#130#198#199#1'k'#3#6#224#132#136#227'8'#222#16'qF'#168'#'#154'mf'#147
-  +#196'Zh'#181#154#22#128#214#177'V'#141'F'#131'T'#177'X'#20#207'kY'#0'm'#0#237
-  +#153#153#202#194'F'#24'"'#221'):'#151#219#252'V'#155'%$q'#140'F'#179#174'-'
-  +#160#157#223#245#160#189'{'#247'J'#154'fS'#203#182'N"s/'#29'y'#233#152#181'v'
-  +']'#183#20':'#179#215'9'#217'#'#137'7'#179#31#242#28#206#156#153#196#192#214
-  +#226'V'#165#148#242']'#151#160'R'#169'$'#141'F#5l'#171#10'4Q'#153#157'}'#235
-  +#233#167#158'ys'#189#141#17'tBlq'#177#129#208#15#214#177#7#251#157#161#217'j'
-  +'arr'#18'"'#156'B'#160#157#243#9#215#1'JD$'#159#207'['#160#189#0#184'S$x'#253
-  +'g'#227'O>'#245#131#31#252#176#28#199#241'{/'#221#215#2#157#219'('#140#162'6'
-  +#250#250#10'8'#241#214'I4'#26#205'u'#25#238'R'#152#154':'#139#167'~'#246'4v'
-  +#239#222#5'f'#24#0#218'y'#142#134#234'C'#29#193#236#240#225#195#220#223#191
-  +#187#149'$'#152#18'QG'#137#240#210'+/'#191#242#220#215#255#229#155#191#152
-  +#156#156'j]q'#139#150'D3'#238'zQ'#163#134#187#239#186#7'SoO'#227#228#201#147
-  +'W|'#184#139#155'!8'#242#194#139'x'#254#185#255#195#240#200' F'#183#141'BX'
-  +#12#0#173#211#206'r'#220'tO'#20'"'#178#251#247#239'_('#20#10''''#18'IX'#145
-  +'D'#243#243#243#245'o|'#253'[s'#251'>'#250#145#219'n'#184#225#250#193'L&'#243
-  +#158#167#156'N9D'#203#228'tvV'#25's'#213#10#238#250#157#15'`jj'#26#207'<'#243
-  +',n'#184#225#6#132#225#250#136'g"'#130#169#169#179'x'#249#197'_'#130#217#225
-  +#142';n'#199#142#157';'#186#159#178#6#160#217#227'srG'#247'"!'#162't'#255#254
-  +#253#181'B'#161'p'#220'Z'#219'"%'#179#204'<'#249#248'cOL<'#241#216#248#232
-  +#200#182#145#29#215']'#183'{'#219#182#209#145#130#231#251#23#246#171#188'#'
-  +#16' @;'#138'x'#226#244'D'#219#218'Tn'#184'qO^ '#168'.V'#177'ek'#1#15'||?~'
-  +#248#163#255#196#233'3'#19#24#29#25#193#142#157#219#17'\'#238'p+03S'#193#196
-  +#196#25'LN'#157'E'#232#251#24#30#25#198#157'w'#222#129#158#222#158#229's'#132
-  +#197#16#177#210#142#169#217'l'#210#170'~_'#17'a"J'#30'~'#248#225#133#179'g'
-  +#207#198'A'#16',('#197#147#142#212'1'#18#185#230#236#212#212#182#201#169#201
-  +'Q'#18#12#14#14#14'^3P'#220':`'#180#9#141#214#30#145'2 '#209#204#162'UWKp'
-  +#142'%'#138'#'#215#138'"'#7'f'#235#152'Skm<77W'#155#154#154#158#131#8#13#14
-  +#13'n'#3#144'_'#178#161#21#181'`L'#130#3#7#30#132'Q'#30'^{'#253'u<'#253#236
-  +'s8=q'#26#131#197#1#132'A'#8#207'3'#208'ZC'#155#11'5l'#17'A;'#138#209'l'#182
-  +'`'#173#131#181#14#237'V'#27'3'#149#10#178#217#16#253#253#5'\'#183'{'#12#163
-  ,#219#182'a'#231#216#14#24#179#186#229'Y:N'#163#153#189#213#30#180'b'#0'!"[*'
-  +#149#154#207'?'#255'|'#146#207#231#23#140#142#223'v'#28#188'I'#236#6'@j'#136
-  +'DF'#166#167#167#135#166'+3[H$'''#160#144#0#31#221'CwJxr'#206'%P*'#1#144#128
-  +#145#136#146'H'#129#218#204#210#0#196#145#162'>'#207'3Y'#0';V'#218'`'#173#197
-  +'|m'#190#211'h'#213#223#135'?~'#232#147'P'#202#224#149'W_'#197#196#196#25#204
-  +#205#205'w'#142#234'<j'#11#139'H'#226#4#158#231'A'#169#142' '#151#205'f'#145
-  +#203'd'#16#134#1#194'0@O>'#143'['#222'w'#19#6#138#3#24#25#30'Fo'#161#23'A'#16
-  +#172#233'e'#188'"'#196'T'#170#214'~'#226#176#219'##D'#148#148'J'#165'trr'#178
-  +'555U'#235#233#233#153#138'(:!L}$'#170'O'#177#244'8P'#134#136'C'#16#133#16
-  +#202#16'!'#180#206#250#0'@'#164'R'#17'D'#0#218#10#18#17#161#13#199'1H9"'#213
-  +'G'#144#235#181'6'#183#172'i'#233#146'G'#181#155#168#214#230#17#199'1zzr'#184
-  +#249#166'='#203'En'''#135'u'#26#184'Rk'#145#166#9#210'4'#133's'#157#166'-E'#4
-  +#227#25'd'#178'Y'#244#228's]]hmb'#150'@L'#6#14#218#136#161'V'#212#162#223#216
-  +'R'#191#130'('#1'`'#15#30'<'#24'k'#232'f'#20'E'#243'a'#24'zi'#198#25#151':'
-  +#19#216#192#0#240#149'R'#30'$'#241'I'#164#243#127#197':'#130#159#0'H'#172#227
-  +'4'#208'Ajs'#150'y'#193#249#202#231'1'#136#30'%z'#231#219#170#237'vkY0['#217
-  +#176'u'#190#30#180'D'#132#239'{'#157#6#173'5'#218#251'.z'#207'`MD'#202'Z{n'
-  +#22#187#228'E'#231'Vq'#142#136#24'@Z*'#149#162'r'#185'L'#6#6#253#253#253#170
-  +'Z'#173'R&'#147'Qss-U('#20#8#0'j'#153#154'lMr<==-'#219#183'o'#231'c'#199#142
-  +#201#158'={h'#186'g:'#135#186'N'#180''''#180'Q'#253'H'#239#20#12'h'#7'h6LH.'
-  +#227#161#222#21'd'#173#252#230#221#165#158#196'Y'#186#238#208#161'C'#170#249
-  +#230#4'[/'#3#6')'#8'o'#242#150#234'jPw'#161'h'#216#144#29#177#151#255#212#243
-  +#249'xw'#143'Ln'#129#165'H)'#129'f'#224#170'"HD'#140#6#180'6L'#133'v'#225'7'
-  +#231#160#245#132#7#128#137#20'x'#227':'#218#222#17#8#138'I'#20#177#172'l'#160
-  +#218'x8'#165':"'#221'&>'#143#186#22#152'E)!f6'#156#201'd6'#231#219#171#215
-  +#235#162#156#179#128'$'#243#243#243#245#205#176'a-'#136#136#204'T*'#11#0#18
-  +#246'8'#173'V'#171#27'OP'#169'T'#146#225'aq'#128#180'Y'#164'~'#226#196#241'I'
-  +#190'J'#148#251#217#202'l='#141#162#186'(Y'#180'l'#163'F'#163#193#155#226'A'
-  +#213'jhSCu"'#204#212'j'#139'g^z'#241#165'S'#155'a'#199'J'#136#8#30#255#233
-  +#248#171#16#204#8#212#172#138'U'#171#221'n'#187#13''''#168';'#219'9nr'#3'N'
-  +#191#13#198#201#255'}'#236#177#231'N'#156'81'#191#209#182#172#180#233#169#159
-  +'?s'#252#141'7'#222'xE'#20'Nhq'#211#214#218#246#248#248#248#230'x'#208#225
-  +#195#135'9'#142#227#182#214'zJ'#196#189#150#182#147#163#143'~'#231'{?}'#252
-  +#241#159#253#218'9'#183#161#225#214'h'#212#211#239'?'#250#253'W'#159'x'#252
-  +#137#159#11#232#168#18#188#201'lf'#235#245'z'#2'l'#208'.'#234#249#16#17#185
-  +#251#238#187#211'f'#179'YcVo'#1'tD'#128#23#159'z'#242#231'O'#127#247';'#143
-  +#190#178'P['#220#144#158#224#147'''O'#213#255#245#159#191#241#252#241#227''''
-  +#158''''#193#11'J'#248#151#204'z'#2'@c||'#220#137#136#172#249#235'/'#27#133
-  +'C'#135#14#169'#G'#142#132'a'#24#14#192'`'#23#152'o'#22#200'M'#153' s'#237
-  +#251'n'#221'{'#195#174#221#187#134#138#3#197#156#181')-'#213'_'#239#166#22#11
-  +#252#11#31#164#1#192'o'#159'9'#179'p'#236#205#183#222'~'#227#181'7^'#19#200#9
-  +#18#250#21#179'}'#29#240'N'#231'r'#149#218#183#191'='#30'/-|7'#149' '#160'CR'
-  +#185'\'#14#140#137'{'#153#245#176#131#30'S$'#187'!'#178'C@#'#153'0;'#178#251
-  +#250'];'#175#217'6Z,'#20#250'3i'#146#208#187'%H)'#197'333'#245#211#167''''
-  +#166'O'#157'<u'#202'97-'#130'I'#165'p'#10#140#147'N'#227#215#202#170#153'F'
-  +#163#209#188#251#238#31#167'_'#249#202#185#150#147'M'''#8#0#136'H='#252#240
-  +#195#186#217'lf'#218#237'v'#175#14#245#128'8'#25'T"#'#12#26'%'#146'Q'#1#134
-  +#140#209#253#217'\'#190#16#250'~'#222#243'L'#198'h'#29#146'R'#129#214#218'('
-  +#173#181#179#214#178'H'#202#142'c'#235'l'#148#166'q+j%'#141'f'#171'Y'#21#145
-  +'y'#0'gEdR'#147'z;'#21#158'&M3'#202#170#185'0'#12#235#19#19#19#241'RX'#173
-  +#178#237'j '#8#232#252#192'J'#169'T'#162'r'#185'l'#208#17#222'2'#236'q'#15#24
-  +'['#20#169#1'a;'#8#232'-'#4#233#21'B'#22',YE'#200#8'Q'#0#192''''#129#2#196#1
-  +'*Aw'#19#20#132#182#136'4'#1','#144'`'#142#21#205'hq'#179'iJ5'#17'i4'#243#205
-  +'h,3'#150#140#142#142#186#139#253'N'#209'UC'#208#18#150#136#26#31#31'W'#0#204
-  +#238#221#189'^'#181#170'3'#198#152#156'R*'#7#164#25'V:'#0#224#11#167#1'`|'
-  +#192#249'J)'#130#131#19#165'Rb'#142#1'I'#0'$bt'#164#156'm1'#155#166#205#216
-  +#166'i'#155#24'@'#2#192#29'>|'#152#129#223'\h_u'#4#173#196'J'#178'2'#153#140
-  +'6'#198'h"'#210'A'#16'('#207#243#148'H]G'#198'('#18#210#190#181#228'\'#167
-  +#199#192'Z'#203#153'L'#194'i'#154'e'#0'n'#229#241'n'#127#213#234#255#1'LV'
-  +#205#17#18#176#19'n'#0#0#0#0'IEND'#174'B`'#130#0#0#0#5'TMemo'#5'meLog'#4'Lef'
-  +'t'#2#4#6'Height'#3#149#0#3'Top'#3'$'#1#5'Width'#3#232#1#5'Align'#7#8'alClie'
-  +'nt'#18'BorderSpacing.Left'#2#2#17'BorderSpacing.Top'#2#2#19'BorderSpacing.R'
-  +'ight'#2#2#20'BorderSpacing.Bottom'#2#2#20'BorderSpacing.Around'#2#2#25'Bord'
-  +'erSpacing.InnerBorder'#2#2#9'Font.Name'#6#22'courier new [monotype]'#10'Par'
-  ,'entFont'#8#8'ReadOnly'#9#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#1#0#0
-  +#11'TOpenDialog'#11'OpenDialog1'#4'left'#3#200#1#3'top'#2'h'#0#0#11'TSaveDia'
-  +'log'#11'SaveDialog1'#10'DefaultExt'#6#4'.fbk'#7'Options'#11#17'ofOverwriteP'
-  +'rompt'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#200#1#3'top'#3#176#0
-  +#0#0#0
+  +'p'#2#6#5'Width'#2'K'#7'Caption'#6#14'Operation Type'#11'ParentColor'#8#0#0#9
+  +'TComboBox'#11'cbOperation'#4'Left'#3#142#0#6'Height'#2#21#3'Top'#2#6#5'Widt'
+  +'h'#3#204#0#10'ItemHeight'#2#13#9'ItemIndex'#2#0#13'Items.Strings'#1#6#6'Bac'
+  +'kup'#6#7'Restore'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#4'Text'#6
+  +#6'Backup'#0#0#6'TLabel'#6'Label2'#4'Left'#2#12#6'Height'#2#13#3'Top'#2'V'#5
+  +'Width'#2']'#7'Caption'#6#17'Targeted Database'#11'ParentColor'#8#0#0#6'TLab'
+  +'el'#6'Label3'#4'Left'#2#14#6'Height'#2#13#3'Top'#3#137#0#5'Width'#2'5'#7'Ca'
+  +'ption'#6#11'Backup File'#11'ParentColor'#8#0#0#5'TEdit'#8'edBackup'#4'Left'
+  +#2'f'#6'Height'#2#21#3'Top'#3#137#0#5'Width'#3'1'#1#7'Anchors'#11#5'akTop'#6
+  +'akLeft'#7'akRight'#0#8'TabOrder'#2#3#0#0#12'TSpeedButton'#12'SpeedButton1'#4
+  +'Left'#3#160#1#6'Height'#2#22#3'Top'#3#133#0#5'Width'#2#23#7'Anchors'#11#5'a'
+  +'kTop'#7'akRight'#0#7'Caption'#6#3'...'#7'OnClick'#7#17'SpeedButton1Click'#0
+  +#0#7'TBitBtn'#7'bbStart'#4'Left'#3'b'#1#6'Height'#2'('#3'Top'#3#1#1#5'Width'
+  +#3#131#0#7'Caption'#6#5'Start'#5'Color'#4#219#242#247#0#4'Kind'#7#5'bkAll'#7
+  +'OnClick'#7#12'bbStartClick'#8'TabOrder'#2#6#0#0#5'TEdit'#16'edTargetDatabas'
+  +'e'#4'Left'#3#142#0#6'Height'#2#21#3'Top'#2'V'#5'Width'#3#8#1#7'Anchors'#11#5
+  +'akTop'#6'akLeft'#7'akRight'#0#14'ParentBidiMode'#8#8'TabOrder'#2#2#0#0#12'T'
+  +'SpeedButton'#16'sbBrowseTargetdb'#4'Left'#3#160#1#6'Height'#2#22#3'Top'#2'U'
+  +#5'Width'#2#23#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#3'...'#7'OnC'
+  +'lick'#7#21'sbBrowseTargetdbClick'#0#0#6'TLabel'#6'Label4'#4'Left'#2#14#6'He'
+  +'ight'#2#13#3'Top'#3#176#0#5'Width'#2'3'#7'Caption'#6#9'User name'#11'Parent'
+  +'Color'#8#0#0#5'TEdit'#10'edUserName'#4'Left'#2'f'#6'Height'#2#21#3'Top'#3
+  +#176#0#5'Width'#3#145#0#8'TabOrder'#2#4#0#0#6'TLabel'#6'Label5'#4'Left'#2#12
+  +#6'Height'#2#13#3'Top'#3#216#0#5'Width'#2'.'#7'Caption'#6#8'Password'#11'Par'
+  +'entColor'#8#0#0#5'TEdit'#10'edPassword'#4'Left'#2'f'#6'Height'#2#21#3'Top'#3
+  +#216#0#5'Width'#3#145#0#8'EchoMode'#7#10'emPassword'#12'PasswordChar'#6#1'-'
+  +#8'TabOrder'#2#5#0#0#6'TLabel'#6'Label6'#4'Left'#2#14#6'Height'#2#13#3'Top'#2
+  +'0'#5'Width'#2#22#7'Caption'#6#4'Host'#11'ParentColor'#8#0#0#5'TEdit'#6'edHo'
+  +'st'#4'Left'#3#142#0#6'Height'#2#21#3'Top'#2'0'#5'Width'#3#6#1#7'Anchors'#11
+  +#5'akTop'#6'akLeft'#7'akRight'#0#14'ParentBidiMode'#8#8'TabOrder'#2#1#0#0#6
+  +'TImage'#6'Image1'#4'Left'#3#152#1#6'Height'#2'L'#3'Top'#2#0#5'Width'#2'O'#12
+  +'Picture.Data'#10#166#20#0#0#23'TPortableNetworkGraphic'#138#20#0#0#137'PNG'
+  +#13#10#26#10#0#0#0#13'IHDR'#0#0#0'H'#0#0#0'H'#8#6#0#0#0'U'#237#179'G'#0#0#0#4
+  +'sBIT'#8#8#8#8'|'#8'd'#136#0#0#0#9'pHYs'#0#0#15#146#0#0#15#146#1#4#168'~'#160
+  +#0#0#0#25'tEXtSoftware'#0'www.inkscape.org'#155#238'<'#26#0#0#0#25'tEXtTitle'
+  +#0'DataBase (2 Blocks)ne'#254#165#0#0#0#24'tEXtAuthor'#0'Jean-Victor Balin'
+  +#236'J'#17'L'#0#0#0'''tEXtDescription'#0'[email protected]'#216#218
+  +#231'Q'#0#0#0#24'tEXtCreation Time'#0'2009-11-09b%w,'#0#0#0'ItEXtCopyright'#0
+  +'Public Domain http://creativecommons.org/licenses/publicdomain/Y'#195#254
+  +#202#0#0#19#18'IDATx'#156#237'\[l\'#215'u]'#251#156's'#31#243' 9'#148'8|'#201
+  +#146'('#217#150#31#138#31'q\'#191#146'8J'#147#166'V'#13#168'I]'#165#8#144#254
+  +#4#133#209'~'#20'H'#220'&'#1#250#209#140#16#160'('#250#213#244#171'-'#242'B'
+  +#2'''m'#245#19#164'i'#131#166#142#205'8~6'#150#237#216#154#216#150#173'GD'
+  +#153#20'9$g'#200'y'#221#199'9{'#247'c'#134#20')Q'#145'-'#139#164'>'#178#128
+  +#11#14'f'#238#229#217'w'#205#222#251#156#189#206#190'C"'#130#223#226#226'P'
+  +#155'm'#192#213#142#223#18't'#9#152#203#189#240#200#145'''>'#208#138#232'o'
+  +#172#179#187#156#181#131#214#185'^v.t'#206#25#199#142#156'c0;q'#214'9'#235'\'
+  +#228#156#173';'#230#138#136#156#18#197'_'#251#179'?'#253#243#199#175#228#141
+  +#172#23'h'#173#28'DD'#4#0#165'R'#137'V'#190#255#208'C'#7'nu"'#255#20''''#209
+  +#221#173'V'#203'w'#206#129#153#225#152#193#29'B'#192#204#157#247#28'/'#191'f'
+  +'v`'#215'='#175'{'#164#137#181'Z'#211#203'a&x'#228#248#177#211'O'#175#28#167
+  +'T*'#9#0#200'U'#144' '#215'"'#136'>'#253#233'O'#171'J'#165'B{'#246#236'!'#0
+  +#248#171'/}'#225'['#237#168'y'#176#213'l'#249#214#185#229#27'^&'#227'2'#8'Z:'
+  +#191#243#158#164#185'\'#246''''#245'Z'#235#161#163'G'#143#242#177'c'#199#164
+  +'X,'#202#222#189'{'#165'T*'#201'f'#18#181#28'bDD"'#192#161'C%'#221'h4'#244
+  +#216#216#24'}'#230'3'#127'4'#186'm'#251#206#23'j'#139#213'~'#231#28#214#207
+  +'N'#241#234#139#245#7#181'G'#243#31#254#240'='#247'''IR'#158#158#158#22#0#174
+  ,'T*1'#17'm'#154'7'#173'L'#210't'#232#208'>].'#151#189'|>'#239'}'#241#203'_xx'
+  +'x'#219'5o.'#212'k'#253#27'e['#154#186'le~'#238#23#31#253#216'G'#14#229#243
+  +'y'#175'\.{'#147#147#147#26#0']'#242#226'u'#130#2':'#222#179'o'#223'>U.'#23
+  +'='#223#247#189#191#251#251#175#254#3#8'_k'#181'['#27'?'#203#9'h'#166'r'#246
+  +'K'#15#30'x'#224#223#1#248'SSS'#222#190'}'#251#212'R^'#220'h('#160#147#140
+  +#139#197#162#242#253#134#247#217#207#254#201'M'#218#152#191'Hm'#186#25#246't'
+  +'A'#152#153#158#254#131#223'{'#240'c'#251#195'0'#244'2'#153#140'>'#127#194
+  +#216'(('#0'('#151#203#4'@'#183't'#232#237#185#241#166#175'Fq{3lY'#5'a@'#129
+  +#254#22#128'?00`'#202#229'2m'#134#23')"'#162'J'#165'B'#0#180'i'#27'/'#240#131
+  +#27#157#179#27'm'#199#133'  '#137#147#237'Zk'#143#153'u'#127#127#255#166',j'
+  +#21#0't'#167's'#173'u'#226#137#176'g'#244'e'#175#31#175#28#4#208'Zk'#231#156
+  +#17#17']'#173'V7/'#196#170#213'*y'#158#167#156#243'M;'#142#26#153'0'#187#25
+  +#182#172#130#0'('#244#245#198#236#177#169'K]7'#26#13#194'&'#204'f'#203'nk'
+  +#140'Q'#204'l'#22#23'k'#149'L'#152#133#231#249#27'm'#203'2'#4#128#239'{'#216
+  +#181'{'#215#162'q'#198#152#200#168#161#161'!*'#149'J'#27'n'#139#2#128'F'#163
+  +'A'#245'z]'#251'>4'#139'Cmq'#14#197'-E'#228#178#185#13'7'#136#153#161#136'p'
+  +#251#251'o'#131#231'y'#194#204#198#24#163#154#205#230#230#133#216#208'P'#155
+  +#150'<H'#4'*IST'#230'+'#232#205#247'ap'#235' 6b'#242#16#1#210'4EO>'#143#251
+  +#239#255'0'#138#131'E'#8'@l'#216'h'#173'U'#20'E'#155'CP'#169#4#2#198#160'u'
+  +#172#152#141#17#17#2#0'f'#135#185'Z'#5','#130#237#163';'#208#155#239#133'R'
+  +#235'0'#145#8'`S'#139'8'#142'0'#182'k'''#238#253#208#189#200'd3'#221#207#132
+  +#12#139'It'#178'i'#178#140#1'Jh6'#203#132'L@hC'#139#200'*c'#26#173':'#162'8B'
+  +'&'#147#197#150#254'"'#226#184#141#249#234#28#22#235#11'`'#190#188'AE'#4'I'
+  +#146' '#142'"'#16#17#134'F'#134#177'}'#199'v'#20#10'}k'#157#174#181#214'*W'
+  +#200'm'#138#7#25#0#136#162#136'r:'#167'R'#157'.{'#208'JX'#151#162#181#208#196
+  +#217#153')'#24'e'#16#134#25'\3'#178#29'Q'#20#161#29#181#17''''#9#226'8'#134
+  +#181')'#210'4'#133#176#128#168'3'#229#136#8#156'c'#216'$E'#146'Z$I'#140'8NP'
+  +#216'R'#192#142#157#219#177'u`'#0'a'#24#192#243#188#11#140#19#128'Xi'#131'6t'
+  +#132#136#186#11'Z'#0#192#225#195#135'}'#223'W'#247'Y'#182#247'8''{Y\'#209'Yw'
+  +'R'#156'{9'#129'<'#253#185#207'~'#238#232#21'#'#168#131'HkV'#6#151#152'J['
+  +#237#22#170#181'*'#226'8'#134'0 '#194#16#22'8'#22#8'3'#4#2#128#224#172'E'#156
+  +#196'p'#214#130#1'h'#165#144#201#4'('#20'z'#145#205#229#16#4'>'#130' X'#149
+  +#223#206'/'#138#133#153#152#217#251#196#199'?q'#237'-'#183#221#252'M'#231#220
+  +']O<'#249'Xhm'#170#242'}!'#152#25#196#10#218'1'#152'5'#216't'#228#22#237#24
+  +#143'~'#255';p'#206#138's'#142#173#181'5'#173#244#191'-'#212#154'_|'#228#145
+  +'G'#162#181#238#235'bj'#1#149'J%u'#252#248'3'#153#150#235#25'R)o'#255#252'_'
+  +#127#254#31'{{{o?'#255#196#164#235'%I'#220#249#219'9'#150#222';'#247':'#142
+  +#227#229#27#213'Z#'#8'|'#248'A'#128' '#8#150'I'#241#253#21#175#131#0#190#239
+  +#157#243#160#174#153#4#2'C'#226'4I'#169#221'n'#249#214#218'sz'#146'skhQ'#231
+  +#244#168#213'Z'#212#185#243'Sk'#161'@s^'#232#127#175#150#169#127#249#217#255
+  +'x6'#1#128#189'{'#247#10#208#17#234#206'''J'#1'@'#20#245#145'J'#149#2#140'^+'
+  +#196#214#11'"'#178'L'#166#136'tnF'#24'A'#16#160#21#181#209'h'#212#131'v'#212
+  +#242#249'r'#147#221'yPJ'#129'!['#219#205#246'_'#154'ij=x'#224#129#239'6'#26
+  +#13'S.'#151#205#228#228#164'>x'#240#224#5#170#193'rBff'#18'%FdcV'#171#29'b'
+  +#168#147#163#216#193'9'#7#173#21'B?'#196#194#194#2#174#20')'#23#3#17#161'V'
+  +#173'}'#230#192#167#30'<u'#207'='#247#12'OMMy'#141'F'#195#236#219#183'O'#175
+  +'$I'#1'@'#28#199#164#148'R"b'#206#159#197#214#19'"'#231'B"'#147#201#130#160
+  +#208'h56jx'#16#1#237'V{X'#25'9'#241#169#131#127#248#169'|>'#239#141#141#141
+  +#153#149#158#164#202#229'2'#245#244#164#164#148'U'#26#208#192#198#133#24#179
+  +#192'9'#135#158'\'#15'D'#24'I'#154'l'#212#208#171#224#156#211's'#149#217#239
+  +#222#255#187#247#221':'#175#230#189'F'#163'a'#150#244#167#174#183'l'#129'UJ'
+  +#137#18#147#203#230#139#235'm'#208'R'#238'af'#16#128#158'|'#15#146'ds'#200'Y'
+  +'a'#19#5'~'#240#189#130#213#254#192#192#128#25#31#31'WDD'#10#0#146'$!e;!'#22
+  +#134#235'_'#202'wEx0'#11#194'0'#3'k'#175#2#253#9#192'BmqG6'#219#27'FQd'#138
+  +#197#162#18'Y'#145#164#173#178#10#208#218#15'|'#189#222#134't'#18#180'@'#216
+  +'!'#147#201't'#215'N'#155#15#231#28#237'}'#255#157#31#200'd'#172#201#229'r'
+  +#234#208#161'R'#199#131#210'\J'#138#148'R"'#198#165#220#170#215#215'?Q2w<(I'
+  +#18#248'f'#243#164#149#149#240#140'F6'#212'q'#154':377'#167#128#174#7'e'#147
+  +',)'#215#201'A'#11#139#213'f'#127'O?fg'#231#214#205#144'%'#15'b'#17#180#219
+  +'m'#132'a'#6'Z'#175#187#227'^'#202'('#20#135#135#225','#148#8't'#161'P'#160
+  +'r'#185'L'#203'!'#166#148'S"0'#205'V3'#205#230#179#128#3#202'G'#127'u'#197'7'
+  +#11#207'-'#12#151#22#135#14#139#141#26#182#22#138'PjsH'#18#17'('#163'p'#211
+  +#205'7B'#196'j'#173#205#178#188#210#9#177'4%K'#164#0#165'E@'#139#141#5#140
+  +#237#26#195'-{o'#195'SO>'#139'v{'#205#242#229#178'A'#157'*'#22#204#12#17#160
+  ,#29#181#209#142'['#24#25#28'E'#224#135'Wt'#172'K'#193'9'#135'0'#12'q'#239#189
+  +#247'!'#12#2'$'#137'5"'#208'==q'#135#160'J'#165'B'#214'ZR'#174#147#131#208']'
+  +'(6Zuh'#159#240#201#3#7#240#203#151'^'#197#143#255#251'''8~'#226'$'#156's'
+  +#239#217'('#17#130't'#141'[\X'#0#0#180#218'M'#204#215#230'P'#220':'#136#254
+  +#190#254#247'<'#198#165'm'#16'$q'#130#161#225'!|'#232#254#15#162#183#175#7#0
+  +#224'DL'#12#210#245'z'#160'*'#149#10'u'#170#249#30#128'"'#167#132#200#200#138
+  +#133'b'#154'&'#168#214#231#177#255#129#223'G'#163#209#198#145#23'_'#192#143
+  +#254#235#127'@D'#216#185#227#26#20#7#6#222#181'a'#214'ZTf'#231'q'#250#244#175
+  +'Q'#169#204#225#174';'#239#192#174'kwu>s)f'#231'g'#208#215'['#192'Xn'#12#139
+  +#141'E'#212#22'k'#136#218'Wn'#159#206#166#22'I'#146'@'#4#184#249#150#189#216
+  +#177'c'#251#234#19#216'i'#0':MS'#2#186'rG'#152'ZJU'#160#192'lp^-'#198#204#168
+  +'.'#206#195'Z'#139#219'o'#191#5#31#188#239'^T'#171'5<'#251#236#243#248#233
+  +#227'O'#162'Z'#237'H'#31#218#243#17#248#30#140'1'#8#195#16'Z'#17#146#212'.kD'
+  +'Ij'#161#9#240'}'#31'['#182#244'cK'#127'?'#246'\'#127'-'#134#135#135'W'#217
+  +''''#16#212#22#171'`'#22#248'&'#192#200#224#8'D'#4#213#133'*'#22#22#23#17#199
+  +#239'.'#220';'#226'\'#138'(j'#195'Z'#135'-['#183#224#250#209#235'02:'#178#166
+  +'Bj'#25'F'#165'J'#5#217#136'j'#181'.A'#214#134'D'#198'*'#1'i'#193#218#181#24
+  +'3c'#161#190#128#202'l'#5'6'#181#184#245#182#189#184#243#206#247'w'#166'kg'
+  +#209'h4P'#173'-bnn'#14's'#213'*'#152#29'2a'#216#17#195#140#7'mT'#167#0'%A'
+  +#224#7#232#237#237#131'@'#144#201#174#189'.evX'#168#215'P'#153#157#134#181#14
+  +#153'0'#131#222'\/$'#215#3'g'#25#206#166#136#146#24'I'#18'#IRXk!]M'#202'Z'
+  +#135'4N'#144#218#4#206'2'#180#209#24#29#29#197'@q'#0'a'#24#194#15#252#139#202
+  +#199#188#236'AY'#218#183#175#185#162#253#197#145'"'#165'.'#240#160#181#224
+  +#216'a'#190':w'#129#30#212'q]F'#161'7'#7#233#222'$'#17#131'4'#224#249'^G'#27
+  +#242'}x'#158#15'aF'#146#166#16#185't'#213#238#156#197#220#252'lg'#140#174#230
+  +#148'$iw-'#213#217#5#129#2'lb'#1#2#180#209#240'}'#31#249'|~'#149#22#245'N6'
+  +#31#152#217#0#208#145#137#212#228#228#30#234'z'#144'%'#29'h'#165#128#247#164
+  +#7#137#8#226'8Y%'#152')u'#225'"PD'#0#18#136'0'#248'2'#151#17#157#208#233#144
+  +#181'4q'#16'Q'#199';'#244#229#11#18'b'#157#1'R'#29#218'pE'#177#154#7#136'\G'
+  +#238#184'H'#136']i'#136't'#234'1l~'#151#221'*'#184#174#7'Yk'#187#4#237#3'B'
+  +#27#18'9'#165#132#228#29#133#216#149#129'@'#186#229#198#213#4#6#180'RJ'#133
+  +#161#163'j'#181'Jj'#207'd'#157#172#181'$Z'#145#234'$'#233#13'R'#20#187#206's'
+  +#149'y'#16#220#146#7#5#29#15#26#29#237#17'c'#226'nW)'#212#134'y'#144#8#248'='
+  +#228#160#245#130#19'1"'#208'.p'#29#130#198#199#1'k'#3#6#224#132#136#227'8'
+  +#222#16'qF'#168'#'#154'mf'#147#196'Zh'#181#154#22#128#214#177'V'#141'F'#131
+  +'T'#177'X'#20#207'kY'#0'm'#0#237#153#153#202#194'F'#24'"'#221'):'#151#219#252
+  +'V'#155'%$q'#140'F'#179#174'-'#160#157#223#245#160#189'{'#247'J'#154'fS'#203
+  +#182'N"s/'#29'y'#233#152#181'v]'#183#20':'#179#215'9'#217'#'#137'7'#179#31
+  +#242#28#206#156#153#196#192#214#226'V'#165#148#242']'#151#160'R'#169'$'#141
+  +'F#5l'#171#10'4Q'#153#157'}'#235#233#167#158'ys'#189#141#17'tBlq'#177#129#208
+  +#15#214#177#7#251#157#161#217'jarr'#18'"'#156'B'#160#157#243#9#215#1'JD$'#159
+  +#207'['#160#189#0#184'S$x'#253'g'#227'O>'#245#131#31#252#176#28#199#241'{/'
+  +#221#215#2#157#219'('#140#162'6'#250#250#10'8'#241#214'I4'#26#205'u'#25#238
+  +'R'#152#154':'#139#167'~'#246'4v'#239#222#5'f'#24#0#218'y'#142#134#234'C'#29
+  +#193#236#240#225#195#220#223#191#187#149'$'#152#18'QG'#137#240#210'+/'#191
+  +#242#220#215#255#229#155#191#152#156#156'j]q'#139#150'D3'#238'zQ'#163#134#187
+  +#239#186#7'SoO'#227#228#201#147'W|'#184#139#155'!8'#242#194#139'x'#254#185
+  +#255#195#240#200' F'#183#141'BX'#12#0#173#211#206'r'#220'tO'#20'"'#178#251
+  +#247#239'_('#20#10''''#18'IX'#145'D'#243#243#243#245'o|'#253'[s'#251'>'#250
+  +#145#219'n'#184#225#250#193'L&'#243#158#167#156'N9D'#203#228'tvV'#25's'#213
+  +#10#238#250#157#15'`jj'#26#207'<'#243',n'#184#225#6#132#225#250#136'g"'#130
+  +#169#169#179'x'#249#197'_'#130#217#225#142';n'#199#142#157';'#186#159#178#6
+  +#160#217#227'srG'#247'"!'#162't'#255#254#253#181'B'#161'p'#220'Z'#219'"%'#179
+  +#204'<'#249#248'cOL<'#241#216#248#232#200#182#145#29#215']'#183'{'#219#182
+  +#209#145#130#231#251#23#246#171#188'#'#16' @;'#138'x'#226#244'D'#219#218'Tn'
+  +#184'qO^ '#168'.V'#177'ek'#1#15'||?~'#248#163#255#196#233'3'#19#24#29#25#193
+  +#142#157#219#17'\'#238'p+03S'#193#196#196#25'LN'#157'E'#232#251#24#30#25#198
+  +#157'w'#222#129#158#222#158#229's'#132#197#16#177#210#142#169#217'l'#210#170
+  +'~_'#17'a"J'#30'~'#248#225#133#179'g'#207#198'A'#16',('#197#147#142#212'1'#18
+  +#185#230#236#212#212#182#201#169#201'Q'#18#12#14#14#14'^3P'#220':`'#180#9#141
+  +#214#30#145'2 '#209#204#162'UWKp'#142'%'#138'#'#215#138'"'#7'f'#235#152'Skm<'
+  +'77W'#155#154#154#158#131#8#13#14#13'n'#3#144'_'#178#161#21#181'`L'#130#3#7
+  +#30#132'Q'#30'^{'#253'u<'#253#236's8=q'#26#131#197#1#132'A'#8#207'3'#208'ZC'
+  +#155#11'5l'#17'A;'#138#209'l'#182'`'#173#131#181#14#237'V'#27'3'#149#10#178
+  ,#217#16#253#253#5'\'#183'{'#12#163#219#182'a'#231#216#14#24#179#186#229'Y:N'
+  +#163#153#189#213#30#180'b'#0'!"[*'#149#154#207'?'#255'|'#146#207#231#23#140
+  +#142#223'v'#28#188'I'#236#6'@j'#136'DF'#166#167#167#135#166'+3[H$'''#160#144
+  +#0#31#221'CwJxr'#206'%P*'#1#144#128#145#136#146'H'#129#218#204#210#0#196#145
+  +#162'>'#207'3Y'#0';V'#218'`'#173#197'|m'#190#211'h'#213#223#135'?~'#232#147
+  +'P'#202#224#149'W_'#197#196#196#25#204#205#205'w'#142#234'<j'#11#139'H'#226#4
+  +#158#231'A'#169#142' '#151#205'f'#145#203'd'#16#134#1#194'0@O>'#143'['#222'w'
+  +#19#6#138#3#24#25#30'Fo'#161#23'A'#16#172#233'e'#188'"'#196'T'#170#214'~'#226
+  +#176#219'##D'#148#148'J'#165'trr'#178'555U'#235#233#233#153#138'(:!L}$'#170
+  +'O'#177#244'8P'#134#136'C'#16#133#16#202#16'!'#180#206#250#0'@'#164'R'#17'D'
+  +#0#218#10#18#17#161#13#199'1H9"'#213'G'#144#235#181'6'#183#172'i'#233#146'G'
+  +#181#155#168#214#230#17#199'1zzr'#184#249#166'='#203'En'''#135'u'#26#184'Rk'
+  +#145#166#9#210'4'#133's'#157#166'-E'#4#227#25'd'#178'Y'#244#228's]]hmb'#150
+  +'@L'#6#14#218#136#161'V'#212#162#223#216'R'#191#130'('#1'`'#15#30'<'#24'k'
+  +#232'f'#20'E'#243'a'#24'zi'#198#25#151':'#19#216#192#0#240#149'R'#30'$'#241
+  +'I'#164#243#127#197':'#130#159#0'H'#172#227'4'#208'Ajs'#150'y'#193#249#202
+  +#231'1'#136#30'%z'#231#219#170#237'vkY0['#217#176'u'#190#30#180'D'#132#239'{'
+  +#157#6#173'5'#218#251'.z'#207'`MD'#202'Z{n'#22#187#228'E'#231'Vq'#142#136#24
+  +'@Z*'#149#162'r'#185'L'#6#6#253#253#253#170'Z'#173'R&'#147'Qss-U('#20#8#0'j'
+  +#153#154'lMr<==-'#219#183'o'#231'c'#199#142#201#158'={h'#186'g:'#135#186'N'
+  +#180''''#180'Q'#253'H'#239#20#12'h'#7'h6LH.'#227#161#222#21'd'#173#252#230
+  +#221#165#158#196'Y'#186#238#208#161'C'#170#249#230#4'[/'#3#6')'#8'o'#242#150
+  +#234'jPw'#161'h'#216#144#29#177#151#255#212#243#249'xw'#143'Ln'#129#165'H)'
+  +#129'f'#224#170'"HD'#140#6#180'6L'#133'v'#225'7'#231#160#245#132#7#128#137#20
+  +'x'#227':'#218#222#17#8#138'I'#20#177#172'l'#160#218'x8'#165':"'#221'&>'#143
+  +#186#22#152'E)!f6'#156#201'd6'#231#219#171#215#235#162#156#179#128'$'#243#243
+  +#243#245#205#176'a-'#136#136#204'T*'#11#0#18#246'8'#173'V'#171#27'OP'#169'T'
+  +#146#225'aq'#128#180'Y'#164'~'#226#196#241'I'#190'J'#148#251#217#202'l='#141
+  +#162#186'(Y'#180'l'#163'F'#163#193#155#226'A'#213'jhSCu"'#204#212'j'#139'g^z'
+  +#241#165'S'#155'a'#199'J'#136#8#30#255#233#248#171#16#204#8#212#172#138'U'
+  +#171#221'n'#187#13''''#168';'#219'9nr'#3'N'#191#13#198#201#255'}'#236#177#231
+  +'N'#156'81'#191#209#182#172#180#233#169#159'?s'#252#141'7'#222'xE'#20'Nhq'
+  +#211#214#218#246#248#248#248#230'x'#208#225#195#135'9'#142#227#182#214'zJ'
+  +#196#189#150#182#147#163#143'~'#231'{?}'#252#241#159#253#218'9'#183#161#225
+  +#214'h'#212#211#239'?'#250#253'W'#159'x'#252#137#159#11#232#168#18#188#201'l'
+  +'f'#235#245'z'#2'l'#208'.'#234#249#16#17#185#251#238#187#211'f'#179'YcVo'#1
+  +'tD'#128#23#159'z'#242#231'O'#127#247';'#143#190#178'P['#220#144#158#224#147
+  +'''O'#213#255#245#159#191#241#252#241#227''''#158''''#193#11'J'#248#151#204
+  +'z'#2'@c||'#220#137#136#172#249#235'/'#27#133'C'#135#14#169'#G'#142#132'a'#24
+  +#14#192'`'#23#152'o'#22#200'M'#153' s'#237#251'n'#221'{'#195#174#221#187#134
+  +#138#3#197#156#181')-'#213'_'#239#166#22#11#252#11#31#164#1#192'o'#159'9'#179
+  +'p'#236#205#183#222'~'#227#181'7^'#19#200#9#18#250#21#179'}'#29#240'N'#231'r'
+  +#149#218#183#191'='#30'/-|7'#149' '#160'CR'#185'\'#14#140#137'{'#153#245#176
+  +#131#30'S$'#187'!'#178'C@#'#153'0;'#178#251#250'];'#175#217'6Z,'#20#250'3i'
+  +#146#208#187'%H)'#197'333'#245#211#167''''#166'O'#157'<u'#202'97-'#130'I'#165
+  +'p'#10#140#147'N'#227#215#202#170#153'F'#163#209#188#251#238#31#167'_'#249
+  +#202#185#150#147'M'''#8#0#136'H='#252#240#195#186#217'lf'#218#237'v'#175#14
+  +#245#128'8'#25'T"#'#12#26'%'#146'Q'#1#134#140#209#253#217'\'#190#16#250'~'
+  +#222#243'L'#198'h'#29#146'R'#129#214#218'('#173#181#179#214#178'H'#202#142'c'
+  +#235'l'#148#166'q+j%'#141'f'#171'Y'#21#145'y'#0'gEdR'#147'z;'#21#158'&M3'#202
+  +#170#185'0'#12#235#19#19#19#241'RX'#173#178#237'j '#8#232#252#192'J'#169'T'
+  +#162'r'#185'l'#208#17#222'2'#236'q'#15#24'['#20#169#1'a;'#8#232'-'#4#233#21
+  +'B'#22',YE'#200#8'Q'#0#192''''#129#2#196#1'*Aw'#19#20#132#182#136'4'#1','#144
+  +'`'#142#21#205'hq'#179'iJ5'#17'i4'#243#205'h,3'#150#140#142#142#186#139#253
+  +'N'#209'UC'#208#18#150#136#26#31#31'W'#0#204#238#221#189'^'#181#170'3'#198
+  +#152#156'R*'#7#164#25'V:'#0#224#11#167#1'`|'#192#249'J)'#130#131#19#165'Rb'
+  +#142#1'I'#0'$bt'#164#156'm1'#155#166#205#216#166'i'#155#24'@'#2#192#29'>|'
+  +#152#129#223'\h_u'#4#173#196'J'#178'2'#153#140'6'#198'h"'#210'A'#16'('#207
+  +#243#148'H]G'#198'('#18#210#190#181#228'\'#167#199#192'Z'#203#153'L'#194'i'
+  +#154'e'#0'n'#229#241'n'#127#213#234#255#1'LV'#205#17#18#176#19'n'#0#0#0#0'IE'
+  +'ND'#174'B`'#130#0#0#0#5'TMemo'#5'meLog'#4'Left'#2#4#6'Height'#2'm'#3'Top'#3
+  +'L'#1#5'Width'#3#232#1#5'Align'#7#8'alClient'#18'BorderSpacing.Left'#2#2#17
+  +'BorderSpacing.Top'#2#2#19'BorderSpacing.Right'#2#2#20'BorderSpacing.Bottom'
+  +#2#2#20'BorderSpacing.Around'#2#2#25'BorderSpacing.InnerBorder'#2#2#9'Font.N'
+  ,'ame'#6#22'courier new [monotype]'#10'ParentFont'#8#8'ReadOnly'#9#10'ScrollB'
+  +'ars'#7#10'ssAutoBoth'#8'TabOrder'#2#1#0#0#11'TOpenDialog'#11'OpenDialog1'#6
+  +'Filter'#6'$*.fbk, *.fbk.zip|*.fbk;*.fbk.zip|*|*'#11'FilterIndex'#2#0#4'left'
+  +#2#16#3'top'#3#16#1#0#0#11'TSaveDialog'#11'SaveDialog1'#10'DefaultExt'#6#4'.'
+  +'fbk'#6'Filter'#6'#*.fbk.zip|*.fbk.zip|*.fbk|*.fbk|*|*'#11'FilterIndex'#2#0#7
+  +'Options'#11#17'ofOverwritePrompt'#14'ofEnableSizing'#12'ofViewDetail'#0#4'l'
+  +'eft'#2'h'#3'top'#3#16#1#0#0#0
 ]);

+ 90 - 5
backuprestore.pas

@@ -6,7 +6,7 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls, Buttons, ExtCtrls;
+  StdCtrls, Buttons, ExtCtrls, Zipper;
 
 type
 
@@ -95,7 +95,14 @@ procedure TfmBackupRestore.bbStartClick(Sender: TObject);
 var
   FireBirdServices: TFirebirdServices;
   Res: Ansistring;
+  TempDir: string; //directory for temp files (including path delimiter)
+  TempFile: string; //if not empty: used for intermediate file when zipping/unzipping
+  Unzipper: TUnzipper;
+  UserFile: string; //file the user chose: either backup destination or restore source
+  FBKZippedFile: string; //name of fbk file when zip compressing
+  Zipper: TZipper;
 begin
+  TempDir:= GetTempDir(false);
   FireBirdServices:= TFirebirdServices.Create;
   try
     FireBirdServices.VerboseOutput:= True;
@@ -104,17 +111,67 @@ begin
     begin
       HostName:= edHost.Text;
       DBName:= edTargetDatabase.Text;
-      UserName := edUserName.Text;
-      Password := edPassword.Text;
-      BkpName := Trim(edBackup.Text);
+      UserName:= edUserName.Text;
+      Password:= edPassword.Text;
+      UserFile:= trim(edBackup.Text);
+
+      if LowerCase(ExtractFileExt(UserFile))='.zip' then
+      begin
+        if cbOperation.ItemIndex = 0 then
+        begin
+          // Backup: set up destination for backup process
+          TempFile:= GetTempFilename(TempDir,'B');
+        end
+        else
+        begin
+          // Restore: unzip .fbk into temporary file
+          TempFile:= sysutils.GetTempFilename;
+          Unzipper:= TUnzipper.Create;
+          try
+            Unzipper.FileName:= UserFile;
+            Unzipper.OutputPath:= TempDir;
+            Unzipper.Examine;
+            if Unzipper.Entries.Count=0 then
+            begin
+              ShowMessage(Format('%s contains no files. Aborting.',[UserFile]));
+              exit;
+            end;
+            if Unzipper.Entries.Count<>1 then
+            begin
+              ShowMessage(Format('%s has more than 1 files. Only zip files with one .fbk file are supported. Aborting.',[UserFile]));
+              exit;
+            end;
+            meLog.Lines.Add('Going to unzip file ' + UserFile + ':' + Unzipper.Entries[0].DiskFileName + ' into directory ' + TempDir);
+            Unzipper.UnZipAllFiles; //we know we're unzipping just 1 file
+            TempFile:= TempDir +
+              ExtractFileName(Unzipper.Entries[0].DiskFileName);
+          finally
+            Unzipper.Free;
+          end;
+        end;
+      end;
 
       try
-        AttachService;
+        if TempFile='' then
+          BackupFile:= UserFile // no zip files involved
+        else
+          {backup to temp, then zip later or
+          restore from temp file}
+          BackupFile:= TempFile;
 
+        AttachService;
         if cbOperation.ItemIndex = 0 then
           StartBackup
         else
+        begin
           StartRestore;
+          // Delete temp file when restore from zip is done
+          if TempFile<>'' then
+          begin
+            Sleep(40); //give file system chance to update locks etc
+            DeleteFile(TempFile);
+          end;
+        end;
 
         while ServiceQuery(Res) do
           meLog.Lines.Add(Res);
@@ -123,6 +180,34 @@ begin
       end;
       meLog.Lines.Add('');
     end;
+
+    if (tempfile<>'' {user wants zip file}) and
+      (cbOperation.ItemIndex = 0 {backup}) then
+    begin
+      // Zip up the resulting backup
+      Zipper:= TZipper.Create;
+      try
+        Zipper.FileName:= UserFile; //target is the user-selected backup file
+        // Figure out the name of the .fbk file to be put in the zip file
+        FBKZippedFile:= ExtractFileName(UserFile);
+        // ChangeFileExt apparently cannot remove the extension, so do it manually
+        //ChangeFileExt(FBKZippedFile,''); //get rid of ending .zip
+        if LowerCase(ExtractFileExt(FBKZippedFile))='.zip' then
+          Delete(FBKZippedFile,1+length(FBKZippedFile)-length('.zip'),length(FBKZippedFile));
+        if LowerCase(ExtractFileExt(FBKZippedFile))<>'.fbk' then
+          FBKZippedFile:= FBKZippedFile+'.fbk'; //add extension if not specified
+        Zipper.Entries.AddFileEntry(TempFile, FBKZippedFile);
+        meLog.Lines.Add('Going to compress file ' + TempFile +
+          ' as filename ' + FBKZippedFile +
+          ' in zip file ' + UserFile);
+        Zipper.ZipAllFiles; //zip up all entries (just 1 in our case)
+        // Delete temp file containing fbk
+        Sleep(40); //give filesystem chance to update locks etc
+        Sysutils.DeleteFile(TempFile);
+      finally
+        Zipper.Free;
+      end;
+    end;
   finally
     FireBirdServices.Free;
   end;

+ 24 - 19
unitfirebirdservices.pas

@@ -7,7 +7,7 @@ unit UnitFirebirdServices;
 interface
 
 uses
-  Classes, SysUtils, ibase60dyn, LCLProc;
+  Classes, SysUtils, ibase60dyn, LazUTF8;
 
 type
 
@@ -17,13 +17,13 @@ type
 
   TFirebirdServices = class(TObject)
   private
-    FBkpName: String;
+    FBackupFile: String;
     FDBName: String;
     FHostName: String;
     FPassword: String;
     FUserName: String;
     FVerboseOutput: Boolean;
-    FPServHandl: pisc_svc_handle;
+    FPServiceHandle: pisc_svc_handle;
     FArrIStatus: array [0..19] of ISC_STATUS;
 
     procedure SetBkpName(const AValue: String);
@@ -36,7 +36,6 @@ type
     // Run backup or restore depending on BR
     procedure StartBackupRestore(BR: Byte);
     procedure RaiseServiceErr;
-
   public
     constructor Create;
     destructor Destroy; override;
@@ -52,11 +51,17 @@ type
     procedure StartSweep;
     function ServiceAttached: Boolean;
 
+    // Name/IP address of host for database connection
     property HostName: String read FHostName write SetHostName;
+    // Database name for connection
     property DBName: String read FDBName write SetDBName;
-    property BkpName: String read FBkpName write SetBkpName;
+    // File that contains a Firebird .fbk file
+    property BackupFile: String read FBackupFile write SetBkpName;
+    // Username for database connection
     property UserName: String read FUserName write SetUserName;
+    // Password for database connection
     property Password: String read FPassword write SetPassword;
+    // If true, give verbose output when running services functions
     property VerboseOutput: Boolean read FVerboseOutput write FVerboseOutput;
   end;
 
@@ -86,11 +91,11 @@ end;
 
 procedure TFirebirdServices.SetBkpName(const AValue: String);
 begin
-  if FBkpName <> AValue then begin
+  if FBackupFile <> AValue then begin
     if ServiceAttached then
       raise EFBServiceError.Create('You cannot change backup file name when service is attached!!!');
 
-    FBkpName := AValue;
+    FBackupFile := AValue;
   end;
 end;
 
@@ -147,12 +152,12 @@ begin
 
   B := isc_spb_bkp_file; // this cluster describes backup file
   S := S + Char(B);
-  W := Length(FBkpName);
+  W := Length(FBackupFile);
   B := W mod 256;
   S := S + Char(B);
   B := W div 256;
   S := S + Char(B);
-  S := S + FBkpName;
+  S := S + FBackupFile;
 
   if FVerboseOutput then begin
     B := isc_spb_verbose; // verbose output
@@ -180,7 +185,7 @@ begin
   W := Length(S);
   Buff := S;
 
-  if isc_service_start(@FArrIStatus, @FPServHandl, nil, W, @Buff) <> 0 then
+  if isc_service_start(@FArrIStatus, @FPServiceHandle, nil, W, @Buff) <> 0 then
     RaiseServiceErr;
 end;
 
@@ -210,7 +215,7 @@ begin
   for I := Low(ResultBuff) to High(ResultBuff) do
     ResultBuff[I] := #0;
 
-  isc_service_query(@FArrIStatus, @FPServHandl, nil, 0, nil,
+  isc_service_query(@FArrIStatus, @FPServiceHandle, nil, 0, nil,
                      Length(S2), @RequestBuff, Length(ResultBuff), @ResultBuff);
 
   Result := False;
@@ -271,23 +276,23 @@ begin
 
   Buff := S;
 
-  if isc_service_start(@FArrIStatus, @FPServHandl, nil, W, @Buff) <> 0 then
+  if isc_service_start(@FArrIStatus, @FPServiceHandle, nil, W, @Buff) <> 0 then
     RaiseServiceErr;
 end;
 
 function TFirebirdServices.ServiceAttached: Boolean;
 begin
-  Result := FPServHandl <> nil;
+  Result := FPServiceHandle <> nil;
 end;
 
 constructor TFirebirdServices.Create;
 begin
   inherited Create;
 
-  FPServHandl := nil;
+  FPServiceHandle := nil;
   FVerboseOutput := True;
   FHostName := '';
-  FBkpName := '';
+  FBackupFile := '';
   FDBName := '';
   FUserName := '';
   FPassword := '';
@@ -336,7 +341,7 @@ begin
 
   Buff := S;
 
-  Result := isc_service_attach(@FArrIStatus, W1, @ServiceName, @FPServHandl, W2, @Buff) = 0;
+  Result := isc_service_attach(@FArrIStatus, W1, @ServiceName, @FPServiceHandle, W2, @Buff) = 0;
 
   if not Result then
     RaiseServiceErr;
@@ -345,12 +350,12 @@ end;
 function TFirebirdServices.DetachService: Boolean;
 begin
   Result := True;
-  if FPServHandl <> nil then begin
-    Result := isc_service_detach(@FArrIStatus, @FPServHandl) = 0;
+  if FPServiceHandle <> nil then begin
+    Result := isc_service_detach(@FArrIStatus, @FPServiceHandle) = 0;
     if not Result then
       RaiseServiceErr;
 
-    FPServHandl := nil;
+    FPServiceHandle := nil;
   end;
 end;