reference/ibase/functions/ibase-backup.xml
4d8da419011b34623bc91aab8d5ef7f5b6bfb128
...
...
@@ -14,11 +14,140 @@
14
14
<methodparam><type>string</type><parameter>source_db</parameter></methodparam>
15
15
<methodparam><type>string</type><parameter>dest_file</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
+
<para>
20
+
This function passes the arguments to the (remote) database server. There it starts a new backup process. Therefore you
21
+
won't get any responses.
22
+
</para>
23
+
</refsect1>
24
+
25
+
<refsect1 role="parameters">
26
+
&reftitle.parameters;
27
+
<para>
28
+
<variablelist>
29
+
<varlistentry>
30
+
<term><parameter>service_handle</parameter></term>
31
+
<listitem>
32
+
<para>
33
+
A previously opened connection to the database server.
34
+
</para>
35
+
</listitem>
36
+
</varlistentry>
37
+
<varlistentry>
38
+
<term><parameter>source_db</parameter></term>
39
+
<listitem>
40
+
<para>
41
+
The absolute file path to the database on the database server. You can also use a database alias.
42
+
</para>
43
+
</listitem>
44
+
</varlistentry>
45
+
<varlistentry>
46
+
<term><parameter>dest_file</parameter></term>
47
+
<listitem>
48
+
<para>
49
+
The path to the backup file on the database server.
50
+
</para>
51
+
</listitem>
52
+
</varlistentry>
53
+
<varlistentry>
54
+
<term><parameter>options</parameter></term>
55
+
<listitem>
56
+
<para>
57
+
Additional options to pass to the database server for backup.
58
+
The <parameter>options</parameter> parameter can be a combination
59
+
of the following constants:
60
+
<constant>IBASE_BKP_IGNORE_CHECKSUMS</constant>,
61
+
<constant>IBASE_BKP_IGNORE_LIMBO</constant>,
62
+
<constant>IBASE_BKP_METADATA_ONLY</constant>,
63
+
<constant>IBASE_BKP_NO_GARBAGE_COLLECT</constant>,
64
+
<constant>IBASE_BKP_OLD_DESCRIPTIONS</constant>,
65
+
<constant>IBASE_BKP_NON_TRANSPORTABLE</constant> or
66
+
<constant>IBASE_BKP_CONVERT</constant>.
67
+
Read the section about <xref linkend="ibase.constants" /> for further information.
68
+
</para>
69
+
</listitem>
70
+
</varlistentry>
71
+
<varlistentry>
72
+
<term><parameter>verbose</parameter></term>
73
+
<listitem>
74
+
<para>
75
+
Since the backup process is done on the database server, you don't have any chance
76
+
to get its output. This argument is useless.
77
+
</para>
78
+
</listitem>
79
+
</varlistentry>
80
+
</variablelist>
81
+
</para>
82
+
</refsect1>
83
+

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

95
+
<refsect1 role="examples">
96
+
&reftitle.examples;
97
+
<para>
98
+
<example>
99
+
<title><function>ibase_backup</function> example</title>
100
+
<programlisting role="php">
101
+
<![CDATA[
102
+
<?php
103
+

104
+
// Attach to database server by ip address and port
105
+
$service = ibase_service_attach ('10.1.11.200/3050', 'sysdba', 'masterkey');
19
106

20
-
&warn.undocumented.func;
107
+
// Start the backup process on database server
108
+
// Backup employee database using full path to /srv/backup/employees.fbk
109
+
// Don't use any special arguments
110
+
ibase_backup($service, '/srv/firebird/employees.fdb', '/srv/backup/employees.fbk');
111
+

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

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

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

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