FireDAC.Phys.FB.TFDFBNBackup

From RAD Studio API Documentation
Jump to: navigation, search

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

Delphi

TFDFBNBackup = class (TFDIBService)

C++

class PASCALIMPLEMENTATION TFDFBNBackup : public Firedac::Phys::Ibbase::TFDIBService

Properties

Type Visibility Source Unit Parent
class public
FireDAC.Phys.FB.pas
FireDAC.Phys.FB.hpp
FireDAC.Phys.FB FireDAC.Phys.FB

Description

The class implementing Firebird-only backup database service.

Use the TFDFBNBackup component to add a Firebird-only backup database capability to an application. This is a programmatic method to invoke the nbackup tool as a thread in the DB server process to backup a database.

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 name to backup a database into.
  • Specify Level - the incremental level or full backup mode.
  • Call Backup method.

Other properties and methods are optional.

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

To restore a backup created by TFDFBNBackup, use the TFDFBNRestore component. The TFDIBSDump component may be used for an Interbase online dump.

Read http://www.firebirdsql.org/manual/nbackup.html for more details.

Example

FDFBNBackup1.DriverLink := FDPhysFBDriverLink1;

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

FDFBNBackup1.Database := 'e:\fb\addemo.fdb';
FDFBNBackup1.BackupFile := 'e:\fb\addemo.backup';
FDFBNBackup1.Level := 0; // full backup

FDFBNBackup1.Backup;

See Also