Merge lp:~hrvojem/percona-xtrabackup/bug839306-2.0 into lp:percona-xtrabackup/2.0

Proposed by Hrvoje Matijakovic
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 550
Proposed branch: lp:~hrvojem/percona-xtrabackup/bug839306-2.0
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 241 lines (+60/-44)
6 files modified
doc/source/innobackupex/innobackupex_option_reference.rst (+6/-6)
doc/source/installation/apt_repo.rst (+1/-5)
doc/source/installation/compiling_xtrabackup.rst (+17/-1)
doc/source/xtrabackup_bin/preparing_the_backup.rst (+4/-0)
doc/source/xtrabackup_bin/xbk_option_reference.rst (+31/-31)
utils/build.sh (+1/-1)
To merge this branch: bzr merge lp:~hrvojem/percona-xtrabackup/bug839306-2.0
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+161550@code.launchpad.net
To post a comment you must log in.
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/innobackupex/innobackupex_option_reference.rst'
2--- doc/source/innobackupex/innobackupex_option_reference.rst 2013-04-29 11:55:07 +0000
3+++ doc/source/innobackupex/innobackupex_option_reference.rst 2013-04-30 07:38:25 +0000
4@@ -40,7 +40,7 @@
5
6 .. option:: --defaults-group=GROUP-NAME
7
8- This option accepts a string argument that specifies the group which should be read from the configuration file. This is needed if you use mysqld_multi.
9+ This option accepts a string argument that specifies the group which should be read from the configuration file. This is needed if you use mysqld_multi. This can also be used to indicate groups other than mysqld and xtrabackup.
10
11 .. option:: --export
12
13@@ -139,10 +139,6 @@
14
15 This option accepts a string argument that specifies the command line options to pass to :command:`scp` when the option :option:`--remost-host` is specified. If the option is not specified, the default options are ``-Cp -c arcfour``.
16
17-.. option:: --sshopt = SSH-OPTIONS
18-
19- This option accepts a string argument that specifies the command line options to pass to :command:`ssh` when the option :option:`--remost-host` is specified.
20-
21 .. option:: --slave-info
22
23 This option is useful when backing up a replication slave server. It prints the binary log position and name of the master server. It also writes this information to the :file:`xtrabackup_slave_info` file as a ``CHANGE MASTER`` command. A new slave for this master can be set up by starting a slave server on this backup and issuing a ``CHANGE MASTER`` command with the binary log position saved in the :file:`xtrabackup_slave_info` file.
24@@ -151,6 +147,10 @@
25
26 This option accepts a string argument that specifies the socket to use when connecting to the local database server with a UNIX domain socket. It is passed to the mysql child process without alteration. See :command:`mysql --help` for details.
27
28+.. option:: --sshopt = SSH-OPTIONS
29+
30+ This option accepts a string argument that specifies the command line options to pass to :command:`ssh` when the option :option:`--remost-host` is specified.
31+
32 .. option:: --stream=STREAMNAME
33
34 This option accepts a string argument that specifies the format in which to do the streamed backup. The backup will be done to ``STDOUT`` in the specified format. Currently, supported formats are `tar` and `xbstream`. Uses :doc:`xbstream <../xbstream/xbstream>`, which is available in *XtraBackup* distributions. If you specify a path after this option, it will be interpreted as the value of :option:`tmpdir`
35@@ -165,7 +165,7 @@
36
37 .. option:: --tmpdir=DIRECTORY
38
39- This option accepts a string argument that specifies the location where a temporary file will be stored. It may be used when :option:`--remote-host` or :option:`--stream` is specified. For these options, the transaction log will first be stored to a temporary file, before streaming or copying to a remote host. This option specifies the location where that temporary file will be stored. If the option is not specifed, the default is to use the value of ``tmpdir`` read from the server configuration.
40+ This option accepts a string argument that specifies the location where a temporary file will be stored. It may be used when :option:`--remote-host` or :option:`--stream` is specified. For these options, the transaction log will first be stored to a temporary file, before streaming or copying to a remote host. This option specifies the location where that temporary file will be stored. If the option is not specified, the default is to use the value of ``tmpdir`` read from the server configuration. innobackupex is passing the tmpdir value specified in my.cnf as the --target-dir option to the xtrabackup binary. Both [mysqld] and [xtrabackup] groups are read from my.cnf. If there is tmpdir in both, then the value being used depends on the order of those group in my.cnf.
41
42 .. option:: --use-memory
43
44
45=== modified file 'doc/source/installation/apt_repo.rst'
46--- doc/source/installation/apt_repo.rst 2012-11-29 16:23:29 +0000
47+++ doc/source/installation/apt_repo.rst 2013-04-30 07:38:25 +0000
48@@ -4,11 +4,7 @@
49
50 *Debian* and *Ubuntu* packages from *Percona* are signed with a key. Before using the repository, you should add the key to :program:`apt`. To do that, run the following commands: ::
51
52- $ gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
53- ... [some output removed] ...
54- gpg: imported: 1
55-
56- $ gpg -a --export CD2EFD2A | sudo apt-key add -
57+ $ apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
58
59 Add this to :file:`/etc/apt/sources.list`, replacing ``VERSION`` with the name of your distribution: ::
60
61
62=== modified file 'doc/source/installation/compiling_xtrabackup.rst'
63--- doc/source/installation/compiling_xtrabackup.rst 2013-04-29 09:29:00 +0000
64+++ doc/source/installation/compiling_xtrabackup.rst 2013-04-30 07:38:25 +0000
65@@ -47,10 +47,26 @@
66
67 Note that the script must be executed from the base directory of |Xtrabackup| sources, and that directory must contain the packages with the source code of the codebase selected. This may appear cumbersome, but if the variable ``AUTO_LOAD="yes"`` is set, the :command:`build.sh` script will download all the source code needed for the build.
68
69+.. note::
70+ The exact versions expected by build.sh script should be used. Changing the version info in build.sh to have it build against a different server version is not supported.
71+
72 At the base directory of the downloaded source code, if you execute ::
73
74 $ AUTO_DOWNLOAD="yes" ./utils/build.sh xtradb
75
76-and you go for a coffee, at your return |XtraBackup| will be ready to be used. The |xtrabackup| binary will be located in the ``percona-xtrabackup/src`` subdirectory.
77+In case you're not able to use ``AUTO_DOWNLOAD="yes"`` option, sources can be downloaded manually for each release:
78+
79+ ================== ========= ===========================================================================
80+ Value Alias Source tarball download link
81+ ================== ========= ===========================================================================
82+ innodb51_builtin 5.1 http://s3.amazonaws.com/percona.com/downloads/community/mysql-5.1.59.tar.gz
83+ innodb51 plugin http://s3.amazonaws.com/percona.com/downloads/community/mysql-5.1.59.tar.gz
84+ innodb55 5.5 http://s3.amazonaws.com/percona.com/downloads/community/mysql-5.5.17.tar.gz
85+ xtradb51 xtradb http://s3.amazonaws.com/percona.com/downloads/community/mysql-5.1.59.tar.gz
86+ xtradb55 xtradb55 http://s3.amazonaws.com/percona.com/downloads/community/mysql-5.5.16.tar.gz
87+ innodb56 5.6 http://s3.amazonaws.com/percona.com/downloads/community/mysql-5.6.10.tar.gz
88+ ================== ========= ===========================================================================
89+
90+After the build has finished |XtraBackup| will be ready to be used. The |xtrabackup| binary will be located in the ``percona-xtrabackup/src`` subdirectory.
91
92 After this you'll need to copy |innobackupex| (in the root folder used to retrieve |XtraBackup|) and the corresponding xtrabackup binary (in the src folder) to some directory listed in the PATH environment variable, e.g. ``/usr/bin``.
93
94=== modified file 'doc/source/xtrabackup_bin/preparing_the_backup.rst'
95--- doc/source/xtrabackup_bin/preparing_the_backup.rst 2012-02-02 20:16:23 +0000
96+++ doc/source/xtrabackup_bin/preparing_the_backup.rst 2013-04-30 07:38:25 +0000
97@@ -4,6 +4,10 @@
98
99 After you make a backup with :option:`--backup`, the next step is to prepare it. The data files are not point-in-time consistent until they've been prepared, because they were copied at different times as the program ran, and they might have been changed while this was happening. If you try to start InnoDB with these data files, it will detect corruption and crash itself to prevent you from running on damaged data. The :option:`--prepare` step makes the files perfectly consistent at a single instant in time, so you can run |InnoDB| on them.
100
101+.. note::
102+
103+ For prepare "innobackupex --apply-log" should be used which will read |InnoDB| configuration from backup-my.cnf automatically, or --defaults-file=backup-my.cnf should be passed to the xtrabackup binary if it is used for preparing the backup. Otherwise it could lead to incorrect restore because xtrabackup could use wrong configuration options.
104+
105 You can run the prepare operation on any machine; it does not need to be on the originating server or the server to which you intend to restore. You can copy the backup to a utility server and prepare it there, for example. It is important, however, that you use the same version of the xtrabackup binary that you used to create the backup to do the prepare.
106
107 During the prepare operation, |xtrabackup| boots up a kind of modified InnoDB that's embedded inside it (the libraries it was linked against). The modifications are necessary to disable InnoDB's standard safety checks, such as complaining that the log file isn't the right size, which aren't appropriate for working with backups. These modifications are only for the xtrabackup binary; you don't need a modified |InnoDB| to use |xtrabackup| for your backups.
108
109=== modified file 'doc/source/xtrabackup_bin/xbk_option_reference.rst'
110--- doc/source/xtrabackup_bin/xbk_option_reference.rst 2013-04-29 11:55:07 +0000
111+++ doc/source/xtrabackup_bin/xbk_option_reference.rst 2013-04-30 07:38:25 +0000
112@@ -9,22 +9,6 @@
113 Options
114 =======
115
116-.. option:: --print-defaults
117-
118- Print the program argument list and exit. Must be given as the first option on the command-line.
119-
120-.. option:: --no-defaults
121-
122- Don't read default options from any option file. Must be given as the first option on the command-line.
123-
124-.. option:: --defaults-file=#
125-
126- Only read default options from the given file. Must be given as the first option on the command-line. Must be a real file; it cannot be a symbolic link.
127-
128-.. option:: --defaults-extra-file=#
129-
130- Read this file after the global files are read. Must be given as the first option on the command-line.
131-
132 .. option:: --apply-log-only
133
134 This option causes only the redo stage to be performed when preparing a backup. It is very important for incremental backups.
135@@ -49,6 +33,18 @@
136
137 The source directory for the backup. This should be the same as the datadir for your MySQL server, so it should be read from :file:`my.cnf` if that exists; otherwise you must specify it on the command line.
138
139+.. option:: --defaults-extra-file=#
140+
141+ Read this file after the global files are read. Must be given as the first option on the command-line.
142+
143+.. option:: --defaults-file=#
144+
145+ Only read default options from the given file. Must be given as the first option on the command-line. Must be a real file; it cannot be a symbolic link.
146+
147+.. option:: --defaults-group
148+
149+ This option is to set the group which should be read from the configuration file. This is used by innobackupex if you use the `--defaults-group` option. It is needed for mysqld_multi deployments.
150+
151 .. option:: --export
152
153 Create files necessary for exporting tables. See :doc:`Exporting and Importing Tables <exporting_importing_tables>`.
154@@ -101,10 +97,6 @@
155 --innodb-read-io-threads
156 --innodb-write-io-threads
157
158-.. option:: --defaults-group
159-
160- This option is to set the group which should be read from the configuration file. This is used by innobackupex if you use the `--defaults-group` option. It is needed for mysqld_multi deployments.
161-
162 .. option:: --log-copy-interval
163
164 This option specifies time interval between checks done by log copying thread in milliseconds (default is 1 second).
165@@ -113,14 +105,22 @@
166
167 Makes xtrabackup not copy data files, and output the contents of the InnoDB log files to STDOUT until the :option:`--suspend-at-end` file is deleted. This option enables :option:`--suspend-at-end` automatically.
168
169-.. option:: --stream=name
170-
171- Stream all backup files to the standard output in the specified format. Currently supported formats are 'xbstream' and 'tar'.
172+.. option:: --no-defaults
173+
174+ Don't read default options from any option file. Must be given as the first option on the command-line.
175+
176+.. option:: --parallel=#
177+
178+ This option specifies the number of threads to use to copy multiple data files concurrently when creating a backup. The default value is 1 (i.e., no concurrent transfer).
179
180 .. option:: --prepare
181
182 Makes :program:`xtrabackup` perform recovery on a backup created with :option:`--backup`, so that it is ready to use. See :doc:`preparing a backup <preparing_the_backup>`.
183
184+.. option:: --print-defaults
185+
186+ Print the program argument list and exit. Must be given as the first option on the command-line.
187+
188 .. option:: --print-param
189
190 Makes :program:`xtrabackup` print out parameters that can be used for copying the data files back to their original locations to restore them. See :ref:`scripting-xtrabackup`.
191@@ -129,18 +129,22 @@
192
193 Causes :program:`xtrabackup` to scan the specified data files and print out index statistics.
194
195+.. option:: --stream=name
196+
197+ Stream all backup files to the standard output in the specified format. Currently supported formats are 'xbstream' and 'tar'.
198+
199 .. option:: --suspend-at-end
200
201 Causes :program:`xtrabackup` to create a file called :file:`xtrabackup_suspended` in the :option:`--target-dir`. Instead of exiting after copying data files, :program:`xtrabackup` continues to copy the log file, and waits until the :file:`xtrabackup_suspended` file is deleted. This enables xtrabackup and other programs to coordinate their work. See :ref:`scripting-xtrabackup`.
202
203+.. option:: --tables=name
204+
205+ A regular expression against which the full tablename, in ``databasename.tablename`` format, is matched. If the name matches, the table is backed up. See :doc:`partial backups <partial_backups>`.
206+
207 .. option:: --tables-file=name
208
209 A file containing one table name per line, in databasename.tablename format. The backup will be limited to the specified tables. See :ref:`scripting-xtrabackup`.
210
211-.. option:: --tables=name
212-
213- A regular expression against which the full tablename, in ``databasename.tablename`` format, is matched. If the name matches, the table is backed up. See :doc:`partial backups <partial_backups>`.
214-
215 .. option:: --target-dir=name
216
217 This option specifies the destination directory for the backup. If the directory does not exist, :program:`xtrabackup` creates it. If the directory does exist and is empty, :program:`xtrabackup` will succeed. :program:`xtrabackup` will not overwrite existing files, however; it will fail with operating system error 17, ``file exists``.
218@@ -159,10 +163,6 @@
219
220 This option affects how much memory is allocated for preparing a backup with :option:`--prepare`, or analyzing statistics with :option:`--stats`. Its purpose is similar to :term:`innodb_buffer_pool_size`. It does not do the same thing as the similarly named option in Oracle's InnoDB Hot Backup tool. The default value is 100MB, and if you have enough available memory, 1GB to 2GB is a good recommended value.
221
222-.. option:: --parallel=#
223-
224- This option specifies the number of threads to use to copy multiple data files concurrently when creating a backup. The default value is 1 (i.e., no concurrent transfer).
225-
226 .. option:: --version
227
228 This option prints |xtrabackup| version and exits.
229
230=== modified file 'utils/build.sh'
231--- utils/build.sh 2013-04-16 11:06:01 +0000
232+++ utils/build.sh 2013-04-30 07:38:25 +0000
233@@ -77,7 +77,7 @@
234 echo "where CODEBASE can be one of the following values or aliases:"
235 echo " innodb50 | 5.0 build against innodb 5.1 builtin, but should be compatible with MySQL 5.0"
236 echo " innodb51_builtin | 5.1 build against built-in InnoDB in MySQL 5.1"
237- echo " innodb51 | plugin build agsinst InnoDB plugin in MySQL 5.1"
238+ echo " innodb51 | plugin build against InnoDB plugin in MySQL 5.1"
239 echo " innodb55 | 5.5 build against InnoDB in MySQL 5.5"
240 echo " innodb56 | 5.6,xtradb56, build against InnoDB in MySQL 5.6"
241 echo " | mariadb100"

Subscribers

People subscribed via source and target branches