{"id":287146,"date":"2017-05-31T17:10:02","date_gmt":"2017-05-31T13:10:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287146"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287146","title":{"rendered":"\u041a\u0430\u043a \u044f \u0434\u0435\u043b\u0430\u044e \u0431\u0435\u043a\u0430\u043f\u044b. \u0421\u0423\u0411\u0414 FireBird"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6c7\/2be\/6b9\/6c72be6b9ba7d9a68c34718248ac1ee6.png\" alt=\"image\"\/><\/p>\n<p>  \u0411\u0435\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430 \u043e\u0442\u043a\u0443\u0434\u0430 \u043d\u0435 \u0436\u0434\u0430\u043b\u0438\u2026 <br \/>  \u0423 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0437\u0430\u0432\u0438\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u201c\u041a\u0430\u0441\u0441\u0430\u201d, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u0441\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0447\u0435\u0440\u0435\u0437 \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0437\u0430\u0434\u0430\u0447.<br \/>  \u0420\u0430\u0431\u043e\u0447\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u201c\u041a\u0430\u0441\u0441\u0430\u201d \u2014 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0441\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u041a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438\u043d\u044f\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0435\u0442\u043d\u0443\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043d\u043e\u043f\u043a\u0443. <\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443\u043c\u0435\u0440\u043b\u0430 DB. FireBird 2.5<br \/>   <a name=\"habracut\"><\/a><br \/>  Backup\u2019\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043d\u0435 \u0431\u044b\u043b\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0411\u0414, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043b\u0435\u0436\u0430\u043b\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 \u0432\u0438\u043d\u0442\u0435, \u0431\u044b\u043b\u0430 \u043c\u0438\u043d\u0443\u0441 8 \u0434\u043d\u0435\u0439. \u041f\u043e\u0434\u043d\u044f\u043b\u0438 \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0441 \u043d\u0435\u0451. \u041d\u043e \u0441\u0443\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>  \u041a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u043a\u0430\u043f\u044b \u0434\u043b\u044f FireBird.<\/p>\n<p>  \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442, \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0411\u0430\u0437\u0430\u0414\u0430\u043d\u043d\u0430\u0445_30_05_2017_23_07_51.fbk  <\/p>\n<pre><code class=\"dos\">@echo off set &quot;currentTime=%Time: =0%&quot; set now=%date:~-4%_%date:~3,2%_%date:~0,2%_%currentTime:~0,2%_%currentTime:~3,2%_%currentTime:~6,2%    set user=SYSDBA set password=masterkey set database_name=PARKDB.FDB set backup_name=Backup\\PARKDB set ext=.fbk   set backup_filename=%backup_name%_%now%%ext% echo %backup_filename%   nbackup -U %user% -P %password% -B 0 %database_name% %backup_filename% <\/code><\/pre>\n<pre><code class=\"dos\">%date:~3,2%<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 date(\u042d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Windows), 2 \u0441\u0438\u043c\u0432\u043e\u043b\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 3 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435<br \/>  \u041e\u0431\u044b\u0447\u043d\u044b\u0439 %date% = 31.05.2017<\/p>\n<pre><code class=\"dos\">set &quot;currentTime=%Time: =0%&quot;<\/code><\/pre>\n<p>  \u041e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0431\u0440\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f 0, \u043a\u043e\u0433\u0434\u0430 \u0447\u0430\u0441\u044b \u043c\u0435\u043d\u044c\u0448\u0435 10, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0435\u0437 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043c\u044b \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434: <\/p>\n<pre><code class=\"dos\">set now=%date:~-4%_%date:~3,2%_%date:~0,2%_%currentTime:~0,2%_%currentTime:~3,2%_%currentTime:~6,2% <\/code><\/pre>\n<p>  \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0431\u044b, \u0447\u0442\u043e now=2017_05_31_ 0_44_33,<\/p>\n<p>  \u0430 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0431\u044b \u0442\u0430\u043a: Backup\\PARKDB_2017_05_31_ 0_44_33.fbk<\/p>\n<p>  \u041f\u0440\u043e\u0431\u0435\u043b \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u0438\u0434\u0435\u043d, \u043d\u043e \u043e\u043d \u043d\u0435\u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f nbackup<\/p>\n<p>  \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/p>\n<p>  \u042d\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b :). <\/p>\n<p>  \u0434\u0430\u043b\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e,<br \/>  \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0437\u0430\u0434\u0430\u0447 \u0432\u0438\u043d\u0434\u043e\u0432\u0441,<br \/>  \u043e\u043d \u043a\u0430\u0436\u0434\u044b\u0435 4 \u0447\u0430\u0441\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043c\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442<br \/>  \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0411\u0414,<br \/>  \u0434\u0430\u043b\u0435\u0435 \u044f \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0435 \u0437\u0430\u0434\u0430\u0447 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443<\/p>\n<pre><code class=\"dos\">@echo off set script_name=e:\\SoftBuild\\Parking\\DB\\DB_Backup.bat set task_name=LotParkingBackup SCHTASKS \/Create \/SC DAILY \/TN %task_name% \/TR %script_name% \/HRESULT \/F \/RI 240 \/DU 24:00 \/v1 <\/code><\/pre>\n<p>  \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0445\u0435\u043b\u043f\u0435. SCHTASKS \/Create \/?<\/p>\n<p>  \u043f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u0437 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440\u0430  <\/p>\n<pre><code class=\"delphi\">function NextButtonClick(CurPageID: Integer): Boolean; var   ServerHost, ServerPort, DBFileName, FBDirPath: string;   ResultCode, ErrorCode: Integer;   UDFFrom, UDFTo, ReaderPort: string;   RegistryTaskFile, DBDirPath, BackupScriptPath, RegistryFileName: string; begin   if CurPageID = SettingsPage.ID then   begin     ServerHost := SettingsPage.Values[0];     ServerPort := SettingsPage.Values[1];     DBFileName := SettingsPage.Values[2];       if IsComponentSelected(cDB) then     begin       DBDirPath := Copy(DBFileName, 1, Pos('PARKDB.FDB', DBFileName) - 1);       BackupScriptPath := DBDirPath + 'DB_Backup.bat'       RegistryTaskFile := '@echo off' + #13#10 +                            'set script_name=' + BackupScriptPath + #13#10 +                            'set task_name=LotParkingBackup' + #13#10 +                            'SCHTASKS \/Create \/SC DAILY \/TN %task_name% \/TR %script_name% \/HRESULT \/F \/RI 240 \/DU 24:00 \/v1' + #13#10;              RegistryFileName := DBDirPath + 'DB_RegistryBackup.bat';       SaveStringToFile(RegistryFileName, RegistryTaskFile, False);              Exec(ExpandConstant(RegistryFileName), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);     end;       end; end; <\/code><\/pre>\n<p>  \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e,<br \/>  \u0438 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443,<br \/>  \u0434\u0430\u043b\u0435\u0435 \u044f \u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0438\u0437 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430,<br \/>  \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438   <\/p>\n<pre><code class=\"dos\">@echo off set task_name=LotParkingBackup SCHTASKS \/DELETE \/TN %task_name% \/F <\/code><\/pre>\n<p>  \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440. \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u041f\u0430\u0440\u043a\u043e\u0432\u043a\u0430, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u0430\u043b\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438\u0437 \u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430<\/p>\n<pre><code class=\"delphi\">[UninstallRun] Filename: &quot;{app}\\DB\\DB_DeleteTask.bat&quot;; WorkingDir: &quot;{app}\\DB\\&quot;; Flags: runhidden waituntilterminated; Components: DB <\/code><\/pre>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043a\u0430\u0436\u0434\u044b\u0435 4 \u0447\u0430\u0441\u0430 \u0435\u0441\u0442\u044c \u0431\u0435\u043a\u0430\u043f, \u0438 \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c UnInstall, \u0442\u043e \u0432\u0441\u0451 \u0447\u0438\u0441\u0442\u043e \ud83d\ude42<\/p>\n<p>  <a href=\"http:\/\/programmingmindstream.blogspot.com\/2017\/05\/1356-firebird.html\">\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b.<\/a><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/329914\/\"> https:\/\/habrahabr.ru\/post\/329914\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6c7\/2be\/6b9\/6c72be6b9ba7d9a68c34718248ac1ee6.png\" alt=\"image\"\/><\/p>\n<p>  \u0411\u0435\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u0430 \u043e\u0442\u043a\u0443\u0434\u0430 \u043d\u0435 \u0436\u0434\u0430\u043b\u0438\u2026 <br \/>  \u0423 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0437\u0430\u0432\u0438\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u201c\u041a\u0430\u0441\u0441\u0430\u201d, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u0441\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0447\u0435\u0440\u0435\u0437 \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0437\u0430\u0434\u0430\u0447.<br \/>  \u0420\u0430\u0431\u043e\u0447\u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u201c\u041a\u0430\u0441\u0441\u0430\u201d \u2014 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0441\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u041a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438\u043d\u044f\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0435\u0442\u043d\u0443\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043d\u043e\u043f\u043a\u0443. <\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443\u043c\u0435\u0440\u043b\u0430 DB. FireBird 2.5   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-287146","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=287146"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287146\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}