ibase_restore

(PHP 5, PHP 7 < 7.4.0)

ibase_restoreInitiates a restore task in the service manager and returns immediately

Description

ibase_restore(
    resource $service_handle,
    string $source_file,
    string $dest_db,
    int $options = 0,
    bool $verbose = false
): mixed

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

Parameters

service_handle

A previously opened connection to the database server.

source_file

The absolute path on the server where the backup file is located.

dest_db

The path to create the new database on the server. You can also use database alias.

options

Additional options to pass to the database server for restore. The options parameter can be a combination of the following constants: IBASE_RES_DEACTIVATE_IDX, IBASE_RES_NO_SHADOW, IBASE_RES_NO_VALIDITY, IBASE_RES_ONE_AT_A_TIME, IBASE_RES_REPLACE, IBASE_RES_CREATE, IBASE_RES_USE_ALL_SPACE, IBASE_PRP_PAGE_BUFFERS, IBASE_PRP_SWEEP_INTERVAL, IBASE_RES_CREATE. Read the section about Predefined Constants for further information.

verbose

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

Return Values

Returns true on success or false on failure.

Since the restore 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.

Examples

Example #1 ibase_restore() example

<?php

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

// Start the restore process on database server
// Restore employee backup to the new emps.fdb database
// Don't use any special arguments
ibase_restore($service'/srv/backup/employees.fbk''/srv/firebird/emps.fdb');

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

Example #2 ibase_restore() example with arguments

<?php

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

// Start the restore process on database server
// Restore to employee database using alias.
// Restore without indixes. Replace existing database.
ibase_restore($service'/srv/backup/employees.fbk''employees.fdb'IBASE_RES_DEACTIVATE_IDX IBASE_RES_REPLACE);

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

See Also

  • ibase_backup() - Initiates a backup task in the service manager and returns immediately

Here you can write a comment


Please enter at least 10 characters.
Loading... Please wait.
* Pflichtangabe
There are no comments available yet.

PHP cURL Tutorial: Using cURL to Make HTTP Requests

cURL is a powerful PHP extension that allows you to communicate with different servers using various protocols, including HTTP, HTTPS, FTP, and more. ...

TheMax

Autor : TheMax
Category: PHP-Tutorials

Midjourney Tutorial - Instructions for beginners

There is an informative video about Midjourney, the tool for creating digital images using artificial intelligence, entitled "Midjourney tutorial in German - instructions for beginners" ...

Mike94

Autor : Mike94
Category: KI Tutorials

Basics of views in MySQL

Views in a MySQL database offer the option of creating a virtual table based on the result of an SQL query. This virtual table can be queried like a normal table without changing the underlying data. ...

admin

Autor : admin
Category: mySQL-Tutorials

Publish a tutorial

Share your knowledge with other developers worldwide

Share your knowledge with other developers worldwide

You are a professional in your field and want to share your knowledge, then sign up now and share it with our PHP community

learn more

Publish a tutorial