ibase_restore

(PHP 5, PHP 7 < 7.4.0)

ibase_restore — 서비스 관리자에서 복원 작업을 시작하고 즉시 반환합니다.


설명

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

이 함수는 인수를 (원격) 데이터베이스 서버에 전달합니다. 거기에서 새로운 복원 프로세스가 시작됩니다. 그러므로 당신은 어떤 응답도 받지 못할 것입니다.


매개변수

service_handle
데이터베이스 서버에 대해 이전에 열린 연결입니다.
source_file
백업 파일이 있는 서버의 절대 경로입니다.
dest_db
서버에 새 데이터베이스를 생성하기 위한 경로입니다. 데이터베이스 별칭을 사용할 수도 있습니다.
options
복원을 위해 데이터베이스 서버에 전달할 추가 옵션입니다. options 매개변수는 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 상수의 조합일 수 있습니다. 자세한 내용은 미리 정의된 상수에 대한 섹션을 참조하십시오.
verbose
복원 프로세스는 데이터베이스 서버에서 수행되므로 출력을 얻을 기회가 없습니다. 이 주장은 쓸모가 없습니다.

반환 값

성공하면 true를, 실패하면 false를 반환합니다.

복원 프로세스는 (원격) 서버에서 수행되기 때문에 이 함수는 인수만 전달합니다. 주장이 합법적인 동안, 당신은 false을 얻지 않을 것입니다.


Examples

예제 #1 ibase_restore() 예제

                  
<?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);
?>
                  
                

예제 #2 인수가 있는 ibase_restore() 예제

                  
<?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);
?>
                  
                

기타

  • ibase_backup() - 서비스 관리자에서 백업 작업을 시작하고 즉시 반환