AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi Firebird Backup/Restore mit FIBPlus
Thema durchsuchen
Ansicht
Themen-Optionen

Firebird Backup/Restore mit FIBPlus

Ein Thema von Chemiker · begonnen am 28. Jun 2009 · letzter Beitrag vom 4. Dez 2010
 
Hansa

Registriert seit: 9. Jun 2002
Ort: Saarland
7.554 Beiträge
 
Delphi 8 Professional
 
#2

Re: Firebird Backup/Restore mit FIBPlus

  Alt 28. Jun 2009, 18:57
So ungefähr :

Delphi-Quellcode:
procedure TfrmSicherung.btnSicherungClick(Sender: TObject);
begin
  inherited;
  SchreibeJournal ('Datensicherung gestartet');
  StatusMemo.Show;
  StatusMemo.Lines.Clear;
  with BackupService do begin
// ServerName := 'localhost';
    LoginPrompt := False;
    Params.Add('user_name='+User);
    Params.Add('password='+Password);
    Active := True;
    try
      Verbose := True;
      // You can set here any your necessary options
      Options := [NonTransportable, IgnoreLimbo];
      DatabaseName := DBgdb;
      BackupFile.Clear;
      BackupFile.Add(DBgbk);
      ServiceStart;
    finally
      Active := False;
      ShowMessage ('lokale Datensicherung beendet !'+#10#13+'Die Datei '+
                     ExtractFilePath (ParamStr (0))+'DB\DB.FBK'+
                    ' sollte aber noch auf ein externes Medium kopiert werden!');
      SchreibeJournal ('Datensicherung beendet');
      Close;
    end;
  end;
end;

procedure TfrmSicherung.FormCreate(Sender: TObject);
begin
  inherited;
  DBgdb := ExtractFilePath (ParamStr (0))+'DB\DB.FDB';
  DBgbk := ExtractFilePath (ParamStr (0))+'DB\DB.FBK';
  User := 'SYSDBA';
  Password := 'masterkey';
end;

Delphi-Quellcode:
inherited frmSicherung: TfrmSicherung
  Left = 408
  Top = 263
  Width = 491
  Height = 423
  Caption = 'Systemsteuerung'
  PixelsPerInch = 96
  TextHeight = 16
  object Label1: TLabel [1]
    Left = 16
    Top = 8
    Width = 128
    Height = 20
    Caption = 'Datensicherung'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clBlue
    Font.Height = -16
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
  end
  inherited sbDrucker: TStatusBar
    Top = 377
    Width = 483
  end
  inherited pnlEscEnde: TGfghPanel
    TabOrder = 3
  end
  object StatusMemo: TMemo
    Left = 16
    Top = 88
    Width = 457
    Height = 241
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = []
    ParentFont = False
    ScrollBars = ssBoth
    TabOrder = 1
    Visible = False
  end
  object btnSicherung: TButton
    Left = 16
    Top = 40
    Width = 75
    Height = 25
    Caption = 'Start'
    TabOrder = 2
    OnClick = btnSicherungClick
  end
  object BackupService: TpFIBBackupService
    OnTextNotify = BackupServiceTextNotify
    BlockingFactor = 0
    Options = []
    Left = 440
    Top = 344
  end
end
Gruß
Hansa
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:02 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz