Merge lp:~hrvojem/percona-xtrabackup/bug1222818-2.1 into lp:percona-xtrabackup/2.1

Proposed by Hrvoje Matijakovic
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 693
Proposed branch: lp:~hrvojem/percona-xtrabackup/bug1222818-2.1
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 247 lines (+53/-30)
10 files modified
doc/source/faq.rst (+5/-0)
doc/source/glossary.rst (+1/-1)
doc/source/howtos/recipes_ibkx_partition.rst (+4/-3)
doc/source/index.rst (+3/-3)
doc/source/innobackupex/innobackupex_script.rst (+1/-1)
doc/source/innobackupex/partial_backups_innobackupex.rst (+3/-3)
doc/source/innobackupex/restoring_individual_tables_ibk.rst (+24/-11)
doc/source/xtrabackup_bin/restoring_individual_tables.rst (+10/-6)
doc/source/xtrabackup_bin/xbk_option_reference.rst (+1/-1)
doc/source/xtrabackup_bin/xtrabackup_binary.rst (+1/-1)
To merge this branch: bzr merge lp:~hrvojem/percona-xtrabackup/bug1222818-2.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+194352@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Same comments as in the 2.0 MP.

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/source/faq.rst'
2--- doc/source/faq.rst 2013-08-30 09:55:04 +0000
3+++ doc/source/faq.rst 2013-11-15 12:43:54 +0000
4@@ -55,3 +55,8 @@
5 ============================================================================================
6
7 In case the ibdata and ib_log files are located in different directories outside of the datadir, you will have to put them in their proper place after the logs have been applied.
8+
9+Backup fails with Error 24: 'Too many open files'
10+=================================================
11+
12+This usually happens when database being backed up contains large amount of files and |Percona XtraBackup| can't open all of them to create a successful backup. In order to avoid this error the operating system should be configured appropriately so that |Percona XtraBackup| can open all its files. On Linux, this can be done with the ``ulimit`` command for specific backup session or by editing the :file:`/etc/security/limits.conf` to change it globally (**NOTE**: the maximum possible value that can be set up is 1048576 which is a hard-coded constant in the Linux kernel).
13
14=== modified file 'doc/source/glossary.rst'
15--- doc/source/glossary.rst 2013-08-30 08:52:03 +0000
16+++ doc/source/glossary.rst 2013-11-15 12:43:54 +0000
17@@ -88,7 +88,7 @@
18 Each |MyISAM| table has ``.MYI`` (MYIndex) file which contains the table's indexes.
19
20 .exp
21- When :doc:`exporting a table <xtrabackup_bin/exporting_importing_tables>` with |Percona XtraBackup|, it creates a file with ``.exp`` extension per exported table containing the information for importing it.
22+ Files with the ``.exp`` extension are created by |Percona XtraBackup| per each |InnoDB| tablespace when the :option:`xtrabckup --export` option is used on prepare. These files can be used to import those tablespaces on |Percona Server| 5.5 or lower versions, see :doc:`restoring individual tables <xtrabackup_bin/restoring_individual_tables>`"
23
24 .MRG
25 Each table using the :program:`MERGE` storage engine, besides of a :term:`.frm` file, will have :term:`.MRG` file containing the names of the |MyISAM| tables associated with it.
26
27=== modified file 'doc/source/howtos/recipes_ibkx_partition.rst'
28--- doc/source/howtos/recipes_ibkx_partition.rst 2013-08-30 08:52:03 +0000
29+++ doc/source/howtos/recipes_ibkx_partition.rst 2013-11-15 12:43:54 +0000
30@@ -36,7 +36,7 @@
31 Preparing the backup
32 =====================
33
34-For preparing partial backups, the procedure is analogous to :doc:`exporting tables <../innobackupex/importing_exporting_tables_ibk>` : apply the logs and use the :option:`--export` option::
35+For preparing partial backups, the procedure is analogous to :doc:`restoring individual tables <../innobackupex/restoring_individual_tables_ibk>` : apply the logs and use the :option:`--export` option::
36
37 $ innobackupex --apply-log --export /mnt/backup/2012-08-28_10-29-09
38
39@@ -65,10 +65,11 @@
40 Restoring from the backups
41 ==========================
42
43-Restoring should be done by :doc:`importing the tables <../innobackupex/importing_exporting_tables_ibk>` in the partial backup to the server.
44+Restoring should be done by :doc:`importing the tables <../innobackupex/restoring_individual_tables_ibk>` in the partial backup to the server.
45
46 .. note::
47- Improved table/partition import is only available in |Percona Server|, this means that partitions which were backed up from different server can be imported as well. For |MySQL| only partitions from that server can be imported with some important limitations. There should be no DROP/CREATE/TRUNCATE/ALTER TABLE commands issued between taking the backup and importing the partition.
48+
49+ Improved table/partition import is only available in |Percona Server| and |MySQL| 5.6, this means that partitions which were backed up from different server can be imported as well. For versions older than |MySQL| 5.6 only partitions from that server can be imported with some important limitations. There should be no DROP/CREATE/TRUNCATE/ALTER TABLE commands issued between taking the backup and importing the partition.
50
51 First step is to create new table in which data will be restored ::
52
53
54=== modified file 'doc/source/index.rst'
55--- doc/source/index.rst 2013-06-19 08:48:19 +0000
56+++ doc/source/index.rst 2013-11-15 12:43:54 +0000
57@@ -7,13 +7,13 @@
58 Percona Xtrabackup - Documentation
59 ====================================
60
61-*Percona* |XtraBackup| is an open-source hot backup utility for |MySQL| - based servers that doesn't lock your database during the backup.
62+|Percona XtraBackup| is an open-source hot backup utility for |MySQL| - based servers that doesn't lock your database during the backup.
63
64 It can back up data from |InnoDB|, |XtraDB|, and |MyISAM| tables on |MySQL| 5.1 [#n-1]_, 5.5 and 5.6 servers, as well as |Percona Server| with |XtraDB|. For a high-level overview of many of its advanced features, including a feature comparison, please see :doc:`intro`.
65
66-Whether it is a 24x7 highly loaded server or a low-transaction-volume environment, *Percona* |XtraBackup| is designed to make backups a seamless procedure without disrupting the performance of the server in a production environment. `Commercial support contracts are available <http://www.percona.com/mysql-support/>`_.
67+Whether it is a 24x7 highly loaded server or a low-transaction-volume environment, |Percona XtraBackup| is designed to make backups a seamless procedure without disrupting the performance of the server in a production environment. `Commercial support contracts are available <http://www.percona.com/mysql-support/>`_.
68
69-*Percona* |XtraBackup| is a combination of the |xtrabackup| *C* program, and the |innobackupex| *Perl* script. The |xtrabackup| program copies and manipulates |InnoDB| and |XtraDB| data files, and the *Perl* script enables enhanced functionality, such as interacting with a running |MySQL| server and backing up |MyISAM| tables.
70+|Percona XtraBackup| is a combination of the |xtrabackup| *C* program, and the |innobackupex| *Perl* script. The |xtrabackup| program copies and manipulates |InnoDB| and |XtraDB| data files, and the *Perl* script enables enhanced functionality, such as interacting with a running |MySQL| server and backing up |MyISAM| tables.
71
72 Introduction
73 ============
74
75=== modified file 'doc/source/innobackupex/innobackupex_script.rst'
76--- doc/source/innobackupex/innobackupex_script.rst 2013-07-31 10:55:11 +0000
77+++ doc/source/innobackupex/innobackupex_script.rst 2013-11-15 12:43:54 +0000
78@@ -48,7 +48,7 @@
79 replication_ibk
80 parallel_copy_ibk
81 throttling_ibk
82- importing_exporting_tables_ibk
83+ restoring_individual_tables_ibk
84 pit_recovery_ibk
85 improved_ftwrl
86
87
88=== modified file 'doc/source/innobackupex/partial_backups_innobackupex.rst'
89--- doc/source/innobackupex/partial_backups_innobackupex.rst 2013-08-30 08:52:03 +0000
90+++ doc/source/innobackupex/partial_backups_innobackupex.rst 2013-11-15 12:43:54 +0000
91@@ -14,7 +14,7 @@
92 Using the :option:`--include` option
93 ------------------------------------
94
95-The regular expression provided to this will be matched against the fully qualified tablename, including the database name, in the form ``databasename.tablename``.
96+The regular expression provided to this will be matched against the fully qualified table name, including the database name, in the form ``databasename.tablename``.
97
98 For example, ::
99
100@@ -57,7 +57,7 @@
101 Preparing Partial Backups
102 =========================
103
104-For preparing partial backups, the procedure is analogous to :doc:`exporting tables <importing_exporting_tables_ibk>` : apply the logs and use the :option:`--export` option::
105+For preparing partial backups, the procedure is analogous to :doc:`restoring individual tables <restoring_individual_tables_ibk>` : apply the logs and use the :option:`--export` option::
106
107 $ innobackupex --apply-log --export /path/to/partial/backup
108
109@@ -84,7 +84,7 @@
110 Restoring Partial Backups
111 =========================
112
113-Restoring should be done by :doc:`importing the tables <importing_exporting_tables_ibk>` in the partial backup to the server.
114+Restoring should be done by :doc:`restoring individual tables <restoring_individual_tables_ibk>` in the partial backup to the server.
115
116 It can also be done by copying back the prepared backup to a "clean" :term:`datadir` (in that case, make sure to include the ``mysql`` database). System database can be created with: ::
117
118
119=== renamed file 'doc/source/innobackupex/importing_exporting_tables_ibk.rst' => 'doc/source/innobackupex/restoring_individual_tables_ibk.rst'
120--- doc/source/innobackupex/importing_exporting_tables_ibk.rst 2013-03-19 15:21:27 +0000
121+++ doc/source/innobackupex/restoring_individual_tables_ibk.rst 2013-11-15 12:43:54 +0000
122@@ -1,14 +1,14 @@
123 .. _imp_exp_ibk:
124
125-===========================================
126- Importing and Exporting Individual Tables
127-===========================================
128-
129-In standard |InnoDB|, it is not normally possible to copy tables between servers by copying the files, even with :term:`innodb_file_per_table` enabled. But |XtraBackup| allows to migrate individual table from any |InnoDB| database to |Percona Server| with |XtraDB|.
130-
131-The table is required to be created with the option :term:`innodb_file_per_table` enabled in the server, as exporting is only possible when table is stored in its own table space.
132-
133-The importing server (at the moment it only supported by |Percona Server|) should have :term:`innodb_file_per_table` and :term:`innodb_expand_import` options enabled.
134+=============================
135+ Restoring Individual Tables
136+=============================
137+
138+In server versions prior to 5.6, it is not possible to copy tables between servers by copying the files, even with :term:`innodb_file_per_table`. However, with the |Percona XtraBackup|, you can export individual tables from any |InnoDB| database, and import them into |Percona Server| with |XtraDB| or |MySQL| 5.6 (The source doesn't have to be |XtraDB| or or |MySQL| 5.6, but the destination does). This only works on individual :term:`.ibd` files, and cannot export a table that is not contained in its own :term:`.ibd` file.
139+
140+.. note::
141+
142+ If you're running |Percona Server| version older than 5.5.10-20.1, variable `innodb_expand_import <http://www.percona.com/doc/percona-server/5.5/management/innodb_expand_import.html#innodb_expand_import>`_ should be used instead of `innodb_import_table_from_xtrabackup <http://www.percona.com/doc/percona-server/5.5/management/innodb_expand_import.html#innodb_import_table_from_xtrabackup>`_.
143
144 Exporting tables
145 ================
146@@ -25,7 +25,20 @@
147 `./mydatabase/mytable.exp` (1 indexes)
148 ..
149
150-Each :term:`.exp` file will be used for importing that table.
151+Now you should see a :term:`.exp` file in the target directory: ::
152+
153+ $ find /data/backups/mysql/ -name export_test.*
154+ /data/backups/mysql/test/export_test.exp
155+ /data/backups/mysql/test/export_test.ibd
156+ /data/backups/mysql/test/export_test.cfg
157+
158+These three files are all you need to import the table into a server running |Percona Server| with |XtraDB| or |MySQL| 5.6.
159+
160+.. note::
161+
162+ |MySQL| uses ``.cfg`` file which contains |InnoDB| dictionary dump in special format. This format is different from the ``.exp`` one which is used in |XtraDB| for the same purpose. Strictly speaking, a ``.cfg`` file is **not** required to import a tablespace to |MySQL| 5.6 or |Percona Server| 5.6. A tablespace will be imported successfully even if it is from another server, but |InnoDB| will do schema validation if the corresponding ``.cfg`` file is present in the same directory.
163+
164+Each :term:`.exp` (or ``.cfg``) file will be used for importing that table.
165
166 .. note::
167
168@@ -42,7 +55,7 @@
169
170 OTHERSERVER|mysql> ALTER TABLE mydatabase.mytable DISCARD TABLESPACE;
171
172-After this, copy :file:`mytable.ibd` and :file:`mytable.exp` files to database's home, and import its tablespace: ::
173+After this, copy :file:`mytable.ibd` and :file:`mytable.exp` ( or :file:`mytable.cfg` if importing to |MySQL| 5.6) files to database's home, and import its tablespace: ::
174
175 OTHERSERVER|mysql> ALTER TABLE mydatabase.mytable IMPORT TABLESPACE;
176
177
178=== renamed file 'doc/source/xtrabackup_bin/exporting_importing_tables.rst' => 'doc/source/xtrabackup_bin/restoring_individual_tables.rst'
179--- doc/source/xtrabackup_bin/exporting_importing_tables.rst 2013-05-06 13:52:03 +0000
180+++ doc/source/xtrabackup_bin/restoring_individual_tables.rst 2013-11-15 12:43:54 +0000
181@@ -1,10 +1,10 @@
182 .. _export_import_tables:
183
184-================================
185- Exporting and Importing Tables
186-================================
187+=============================
188+ Restoring Individual Tables
189+=============================
190
191-In |InnoDB| versions prior to 5.6, it is not possible to copy tables between servers by copying the files, even with :term:`innodb_file_per_table`. However, with the |xtrabackup| binary, you can export individual tables from any |InnoDB| database, and import them into |Percona Server| with |XtraDB| or |MySQL| 5.6. (The source doesn't have to be |XtraDB| or or |MySQL| 5.6, but the destination does.) This functionality requires :term:`innodb_file_per_table` to be used on both servers, and requires :term:`innodb_expand_import` to be enabled on the destination server. It only works on individual :term:`.ibd` files, and cannot export a table that is not contained in its own :term:`.ibd` file.
192+In server versions prior to 5.6, it is not possible to copy tables between servers by copying the files, even with :term:`innodb_file_per_table`. However, with |Percona XtraBackup|, you can export individual tables from any |InnoDB| database, and import them into |Percona Server| with |XtraDB| or |MySQL| 5.6. (The source doesn't have to be |XtraDB| or or |MySQL| 5.6, but the destination does.) This only works on individual :term:`.ibd` files, and cannot export a table that is not contained in its own :term:`.ibd` file.
193
194 Let's see how to export and import the following table: ::
195
196@@ -12,6 +12,10 @@
197 a int(11) DEFAULT NULL
198 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
199
200+.. note::
201+
202+ If you're running |Percona Server| version older than 5.5.10-20.1, variable `innodb_expand_import <http://www.percona.com/doc/percona-server/5.5/management/innodb_expand_import.html#innodb_expand_import>`_ should be used instead of `innodb_import_table_from_xtrabackup <http://www.percona.com/doc/percona-server/5.5/management/innodb_expand_import.html#innodb_import_table_from_xtrabackup>`_.
203+
204 Exporting the Table
205 ===================
206
207@@ -35,12 +39,12 @@
208
209 .. note::
210
211- |MySQL| uses ``.cfg`` file which contains |InnoDB| dictionary dump in special format. This format is different from the ``.exp`` one which is used in |XtraDB| for the same purpose.
212+ |MySQL| uses ``.cfg`` file which contains |InnoDB| dictionary dump in special format. This format is different from the ``.exp`` one which is used in |XtraDB| for the same purpose. Strictly speaking, a ``.cfg`` file is not required to import a tablespace to |MySQL| 5.6 or |Percona Server| 5.6. A tablespace will be imported successfully even if it is from another server, but |InnoDB| will do schema validation if the corresponding ``.cfg`` file is present in the same directory.
213
214 Importing the Table
215 ===================
216
217-On the destination server running |Percona Server| with |XtraDB| and :term:`innodb_expand_import` option enabled, or |MySQL| 5.6, create a table with the same structure, and then perform the following steps:
218+On the destination server running |Percona Server| with |XtraDB| and `innodb_import_table_from_xtrabackup <http://www.percona.com/doc/percona-server/5.5/management/innodb_expand_import.html#innodb_import_table_from_xtrabackup>`_ option enabled, or |MySQL| 5.6, create a table with the same structure, and then perform the following steps:
219
220 * Execute ``ALTER TABLE test.export_test DISCARD TABLESPACE;``
221
222
223=== modified file 'doc/source/xtrabackup_bin/xbk_option_reference.rst'
224--- doc/source/xtrabackup_bin/xbk_option_reference.rst 2013-11-06 15:44:58 +0000
225+++ doc/source/xtrabackup_bin/xbk_option_reference.rst 2013-11-15 12:43:54 +0000
226@@ -55,7 +55,7 @@
227
228 .. option:: --export
229
230- Create files necessary for exporting tables. See :doc:`Exporting and Importing Tables <exporting_importing_tables>`.
231+ Create files necessary for exporting tables. See :doc:`Restoring Individual Tables <restoring_individual_tables>`.
232
233 .. option:: --extra-lsndir=name
234
235
236=== modified file 'doc/source/xtrabackup_bin/xtrabackup_binary.rst'
237--- doc/source/xtrabackup_bin/xtrabackup_binary.rst 2013-09-19 13:06:49 +0000
238+++ doc/source/xtrabackup_bin/xtrabackup_binary.rst 2013-11-15 12:43:54 +0000
239@@ -46,7 +46,7 @@
240 scripting_backups_xbk
241 analyzing_table_statistics
242 working_with_binary_logs
243- exporting_importing_tables
244+ restoring_individual_tables
245 lru_dump
246
247 .. performance_tunning_innobackupex

Subscribers

People subscribed via source and target branches