reference/ibase/functions/ibase-restore.xml
589b749bcdff6f0dc538e94557c96e7dac246fa3
...
...
@@ -14,11 +14,145 @@
14
14
<methodparam><type>string</type><parameter>source_file</parameter></methodparam>
15
15
<methodparam><type>string</type><parameter>dest_db</parameter></methodparam>
16
16
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
17
-
<methodparam choice="opt"><type>bool</type><parameter>verbose</parameter><initializer>false</initializer></methodparam>
17
+
<methodparam choice="opt"><type>bool</type><parameter>verbose</parameter><initializer>&false;</initializer></methodparam>
18
18
</methodsynopsis>
19
19

20
-
&warn.undocumented.func;
20
+
<para>
21
+
This function passes the arguments to the (remote) database server. There it starts a new restore process. Therefore you
22
+
won't get any responses.
23
+
</para>
24
+
</refsect1>
25
+
26
+
<refsect1 role="parameters">
27
+
&reftitle.parameters;
28
+
<para>
29
+
<variablelist>
30
+
<varlistentry>
31
+
<term><parameter>service_handle</parameter></term>
32
+
<listitem>
33
+
<para>
34
+
A previously opened connection to the database server.
35
+
</para>
36
+
</listitem>
37
+
</varlistentry>
38
+
<varlistentry>
39
+
<term><parameter>source_file</parameter></term>
40
+
<listitem>
41
+
<para>
42
+
The absolute path on the server where the backup file is located.
43
+
</para>
44
+
</listitem>
45
+
</varlistentry>
46
+
<varlistentry>
47
+
<term><parameter>dest_db</parameter></term>
48
+
<listitem>
49
+
<para>
50
+
The path to create the new database on the server. You can also use database alias.
51
+
</para>
52
+
</listitem>
53
+
</varlistentry>
54
+
<varlistentry>
55
+
<term><parameter>options</parameter></term>
56
+
<listitem>
57
+
<para>
58
+
Additional options to pass to the database server for restore.
59
+
The <parameter>options</parameter> parameter can be a combination
60
+
of the following constants:
61
+
<constant>IBASE_RES_DEACTIVATE_IDX</constant>,
62
+
<constant>IBASE_RES_NO_SHADOW</constant>,
63
+
<constant>IBASE_RES_NO_VALIDITY</constant>,
64
+
<constant>IBASE_RES_ONE_AT_A_TIME</constant>,
65
+
<constant>IBASE_RES_REPLACE</constant>,
66
+
<constant>IBASE_RES_CREATE</constant>,
67
+
<constant>IBASE_RES_USE_ALL_SPACE</constant>,
68
+
<constant>IBASE_PRP_PAGE_BUFFERS</constant>,
69
+
<constant>IBASE_PRP_SWEEP_INTERVAL</constant>,
70
+
<constant>IBASE_RES_CREATE</constant>.
71
+
Read the section about <xref linkend="ibase.constants" /> for further information.
72
+
</para>
73
+
</listitem>
74
+
</varlistentry>
75
+
<varlistentry>
76
+
<term><parameter>verbose</parameter></term>
77
+
<listitem>
78
+
<para>
79
+
Since the restore process is done on the database server, you don't have any chance
80
+
to get its output. This argument is useless.
81
+
</para>
82
+
</listitem>
83
+
</varlistentry>
84
+
</variablelist>
85
+
</para>
86
+
</refsect1>
87
+

88
+
<refsect1 role="returnvalues">
89
+
&reftitle.returnvalues;
90
+
<para>
91
+
&return.success;
92
+
</para>
93
+
<para>
94
+
Since the restore process is done on the (remote) server, this function just passes the arguments to it.
95
+
While the arguments are legal, you won't get &false;.
96
+
</para>
97
+
</refsect1>
98
+

99
+
<refsect1 role="examples">
100
+
&reftitle.examples;
101
+
<para>
102
+
<example>
103
+
<title><function>ibase_restore</function> example</title>
104
+
<programlisting role="php">
105
+
<![CDATA[
106
+
<?php
107
+

108
+
// Attach to database server by ip address and port
109
+
$service = ibase_service_attach ('10.1.11.200/3050', 'sysdba', 'masterkey');
110
+

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

116
+
// Free the attached connection
117
+
ibase_service_detach ($service);
118
+
?>
119
+
]]>
120
+
</programlisting>
121
+
</example>
122
+
</para>
123
+
124
+
<para>
125
+
<example>
126
+
<title><function>ibase_restore</function> example with arguments</title>
127
+
<programlisting role="php">
128
+
<![CDATA[
129
+
<?php
130
+

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

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

139
+
// Free the attached connection
140
+
ibase_service_detach ($service);
141
+
?>
142
+
]]>
143
+
</programlisting>
144
+
</example>
145
+
</para>
146
+
</refsect1>
147
+
21
148
149
+
<refsect1 role="seealso">
150
+
&reftitle.seealso;
151
+
<para>
152
+
<simplelist>
153
+
<member><function>ibase_backup</function></member>
154
+
</simplelist>
155
+
</para>
22
156
</refsect1>
23
157

24
158
</refentry>
25
159