FireDAC.Phys.IBBase.TFDIBRestore
Delphi
TFDIBRestore = class (TFDIBService)
C++
class PASCALIMPLEMENTATION TFDIBRestore : public TFDIBService
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FireDAC.Phys.IBBase.pas FireDAC.Phys.IBBase.hpp |
FireDAC.Phys.IBBase | FireDAC.Phys.IBBase |
Description
The class implementing the Firebird and InterBase service that restores a database from a backup.
Use the TFDIBRestore component to add a backed up database restore capability to an application. This is a programmatic method to invoke the gbak tool as a thread in the DB server process.
To configure the connection to the database server, you must fill the following properties: DriverLink, Host, Protocol, UserName and Password.
To restore a database from a DB backup, an application should:
- Specify Database - the database file (destination database) where the backup is restored.
- Specify BackupFiles - the file names to restore a database from.
- Specify EUAUserName, EUAPassword to restore Interbase database with EUA enabled.
- Call Restore method.
Other properties and methods are optional.
Paths of backup files are relative to the server. Because TFDIBRestore restores the backup on the DB server host, the DB Service Manager reads backup files on the server host.
To produce a DB restore log, an application should set Verbose to True and use OnProgress event.
The TFDFBNRestore component should be used to restore a Firebird incremental backup.
Example
FDIBRestore1.DriverLink := FDPhysFBDriverLink1;
FDIBRestore1.UserName := 'sysdba';
FDIBRestore1.Password := 'masterkey';
FDIBRestore1.Host := 'db_srv_host';
FDIBRestore1.Protocol := ipTCPIP;
FDIBRestore1.Database := 'e:\fb\addemo.fdb';
FDIBRestore1.BackupFiles.Add('e:\fb\addemo.backup');
FDIBRestore1.Restore;