PHP 8.0.26 Released!


(PHP 5, PHP 7 < 7.4.0)

ibase_backupInitiates a backup task in the service manager and returns immediately


    resource $service_handle,
    string $source_db,
    string $dest_file,
    int $options = 0,
    bool $verbose = false
): mixed

This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you won't get any responses.

Bağımsız Değişkenler


A previously opened connection to the database server.


The absolute file path to the database on the database server. You can also use a database alias.


The path to the backup file on the database server.


Additional options to pass to the database server for backup. The options parameter can be a combination of the following constants: IBASE_BKP_IGNORE_CHECKSUMS, IBASE_BKP_IGNORE_LIMBO, IBASE_BKP_METADATA_ONLY, IBASE_BKP_NO_GARBAGE_COLLECT, IBASE_BKP_OLD_DESCRIPTIONS, IBASE_BKP_NON_TRANSPORTABLE or IBASE_BKP_CONVERT. Read the section about Öntanımlı Sabitler for further information.


Since the backup process is done on the database server, you don't have any chance to get its output. This argument is useless.

Dönen Değerler

Başarı durumunda true, başarısızlık durumunda false döner.

Since the backup process is done on the (remote) server, this function just passes the arguments to it. While the arguments are legal, you won't get false.


Örnek 1 ibase_backup() example


// Attach to database server by ip address and port
$service ibase_service_attach ('''sysdba''masterkey');

// Start the backup process on database server
// Backup employee database using full path to /srv/backup/employees.fbk
// Don't use any special arguments

// Free the attached connection
ibase_service_detach ($service);

Örnek 2 ibase_backup() example with arguments


// Attach to database server by name and default port
$service ibase_service_attach ('fb-server.contoso.local''sysdba''masterkey');

// Start the backup process on database server
// Backup employee database using alias to /srv/backup/employees.fbk.
// Backup only the metadata. Don't create a transportable backup.
ibase_backup($service'employees.fdb''/srv/backup/employees.fbk'IBASE_BKP_METADATA_ONLY IBASE_BKP_NON_TRANSPORTABLE);

// Free the attached connection
ibase_service_detach ($service);

Ayrıca Bakınız

  • ibase_restore() - Initiates a restore task in the service manager and returns immediately

add a note

User Contributed Notes 1 note

16 years ago
I tried to get the backup function working, but could never figur out where to get the resource service_handle. The trick was to use ibase_service_attach.

$resource_service_handle = ibase_service_attach ('localhost', 'username', 'password');

ibase_backup($resource_service_handle, 'source_database', 'destination_file');

ibase_service_detach ($resource_service_handle);
To Top