FireDAC.Phys.IBBase.TFDIBBackup

From RAD Studio API Documentation
Jump to: navigation, search

FireDAC.Phys.IBBase.TFDIBServiceFireDAC.Phys.TFDPhysDriverServiceFireDAC.Stan.Intf.TFDComponentSystem.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTFDIBBackup

Delphi

TFDIBBackup = class (TFDIBService)

C++

class PASCALIMPLEMENTATION TFDIBBackup : public TFDIBService

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 Firebird and InterBase database backup service.

Use the TFDIBBackup component to add a Firebird or InterBase database backup 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 produce a DB backup, an application should:

  • Specify Database - a primary database file to backup.
  • Specify BackupFiles - the file names to backup a database into.
  • Call Backup method.

Other properties and methods are optional.

Paths of the backup files are relative to the server. Because TFDIBBackup executes backup on the DB server host, the DB Service Manager writes backup files on the server host. The DB Services Manager also creates files in the context of the server.

To produce a DB backup log, an application should set Verbose to True and use OnProgress event.

To restore a backup created by TFDIBBackup use the TFDIBRestore component. The TFDFBNBackup component may be used for a Firebird incremental backup. The TFDIBSDump component may be used for an Interbase online dump.

Example

FDIBBackup1.DriverLink := FDPhysFBDriverLink1;

FDIBBackup1.UserName := 'sysdba';
FDIBBackup1.Password := 'masterkey';
FDIBBackup1.Host := 'db_srv_host';
FDIBBackup1.Protocol := ipTCPIP;

FDIBBackup1.Database := 'e:\fb\addemo.fdb';
FDIBBackup1.BackupFiles.Add('e:\fb\addemo.backup');

FDIBBackup1.Backup;

See Also