Merge lp:~hrvojem/percona-xtrabackup/rn-2.3.0-alpha1-2.2 into lp:percona-xtrabackup/2.3
- rn-2.3.0-alpha1-2.2
- Merge into 2.3
Proposed by
Alexey Kopytov
Status: | Rejected |
---|---|
Rejected by: | Alexey Kopytov |
Proposed branch: | lp:~hrvojem/percona-xtrabackup/rn-2.3.0-alpha1-2.2 |
Merge into: | lp:percona-xtrabackup/2.3 |
Diff against target: |
576 lines (+326/-23) 15 files modified
storage/innobase/xtrabackup/doc/source/conf.py (+2/-0) storage/innobase/xtrabackup/doc/source/installation/apt_repo.rst (+2/-2) storage/innobase/xtrabackup/doc/source/manual.rst (+4/-0) storage/innobase/xtrabackup/doc/source/release-notes.rst (+11/-0) storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.1-alpha1.rst (+1/-1) storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.2-beta1.rst (+1/-1) storage/innobase/xtrabackup/doc/source/release-notes/2.3/2.3.0-alpha1.rst (+16/-0) storage/innobase/xtrabackup/doc/source/xbcloud/xbcloud.rst (+87/-0) storage/innobase/xtrabackup/innobackupex.pl (+53/-13) storage/innobase/xtrabackup/src/xtrabackup.cc (+2/-0) storage/innobase/xtrabackup/test/bootstrap.sh (+6/-6) storage/innobase/xtrabackup/test/t/bug1372679.sh (+54/-0) storage/innobase/xtrabackup/test/t/bug1382347.sh (+39/-0) storage/innobase/xtrabackup/test/t/bug369913.sh (+15/-0) storage/innobase/xtrabackup/test/t/innodb_data_home_dir.sh (+33/-0) |
To merge this branch: | bzr merge lp:~hrvojem/percona-xtrabackup/rn-2.3.0-alpha1-2.2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Needs Resubmitting | ||
Review via email: mp+240708@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Unmerged revisions
- 5042. By Hrvoje Matijakovic
-
-xbcloud documentation, 2.3.0-alpha1 release notes
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'storage/innobase/xtrabackup/doc/source/conf.py' | |||
2 | --- storage/innobase/xtrabackup/doc/source/conf.py 2014-09-30 09:43:35 +0000 | |||
3 | +++ storage/innobase/xtrabackup/doc/source/conf.py 2014-11-05 11:10:08 +0000 | |||
4 | @@ -122,6 +122,8 @@ | |||
5 | 122 | 122 | ||
6 | 123 | .. |MariaDB| replace:: *MariaDB* | 123 | .. |MariaDB| replace:: *MariaDB* |
7 | 124 | 124 | ||
8 | 125 | .. |xbcloud| replace:: *xbcloud* | ||
9 | 126 | |||
10 | 125 | .. |tar4ibd| replace:: :program:`tar4ibd` | 127 | .. |tar4ibd| replace:: :program:`tar4ibd` |
11 | 126 | 128 | ||
12 | 127 | .. |tar| replace:: :program:`tar` | 129 | .. |tar| replace:: :program:`tar` |
13 | 128 | 130 | ||
14 | === modified file 'storage/innobase/xtrabackup/doc/source/installation/apt_repo.rst' | |||
15 | --- storage/innobase/xtrabackup/doc/source/installation/apt_repo.rst 2014-09-25 16:10:20 +0000 | |||
16 | +++ storage/innobase/xtrabackup/doc/source/installation/apt_repo.rst 2014-11-05 11:10:08 +0000 | |||
17 | @@ -37,10 +37,10 @@ | |||
18 | 37 | 37 | ||
19 | 38 | * 10.04LTS (lucid) | 38 | * 10.04LTS (lucid) |
20 | 39 | * 12.04LTS (precise) | 39 | * 12.04LTS (precise) |
21 | 40 | * 13.10 (saucy) | ||
22 | 41 | * 14.04LTS (trusty) | 40 | * 14.04LTS (trusty) |
23 | 41 | * 14.10 (utopic) | ||
24 | 42 | 42 | ||
26 | 43 | .. _debian_experimental: | 43 | .. _debian_testing: |
27 | 44 | 44 | ||
28 | 45 | Percona `apt` Testing repository | 45 | Percona `apt` Testing repository |
29 | 46 | ================================= | 46 | ================================= |
30 | 47 | 47 | ||
31 | === modified file 'storage/innobase/xtrabackup/doc/source/manual.rst' | |||
32 | --- storage/innobase/xtrabackup/doc/source/manual.rst 2013-08-30 09:55:04 +0000 | |||
33 | +++ storage/innobase/xtrabackup/doc/source/manual.rst 2014-11-05 11:10:08 +0000 | |||
34 | @@ -12,6 +12,7 @@ | |||
35 | 12 | xtrabackup_bin/xtrabackup_binary | 12 | xtrabackup_bin/xtrabackup_binary |
36 | 13 | xbstream/xbstream | 13 | xbstream/xbstream |
37 | 14 | xbcrypt/xbcrypt | 14 | xbcrypt/xbcrypt |
38 | 15 | xbcloud/xbcloud | ||
39 | 15 | how_xtrabackup_works | 16 | how_xtrabackup_works |
40 | 16 | 17 | ||
41 | 17 | |Percona XtraBackup| is a set of following tools: | 18 | |Percona XtraBackup| is a set of following tools: |
42 | @@ -28,4 +29,7 @@ | |||
43 | 28 | :doc:`xbstream <xbstream/xbstream>` | 29 | :doc:`xbstream <xbstream/xbstream>` |
44 | 29 | utility that allows streaming and extracting files to/from the :term:`xbstream` format. | 30 | utility that allows streaming and extracting files to/from the :term:`xbstream` format. |
45 | 30 | 31 | ||
46 | 32 | :doc:`xbcloud <xbcloud/xbcloud>` | ||
47 | 33 | utility used for downloading and uploading full or part of |xbstream| archive from/to cloud. | ||
48 | 34 | |||
49 | 31 | It is possible to use the |xtrabackup| binary alone, however, the recommend way is using it through the |innobackupex| wrapper script and let it execute |xtrabackup| for you. It might be helpful to first learn :doc:`how to use innobackupex <innobackupex/innobackupex_script>`, and then learn :doc:`how to use xtrabackup <xtrabackup_bin/xtrabackup_binary>` for having a better low-level understanding or control of the tool if needed. | 35 | It is possible to use the |xtrabackup| binary alone, however, the recommend way is using it through the |innobackupex| wrapper script and let it execute |xtrabackup| for you. It might be helpful to first learn :doc:`how to use innobackupex <innobackupex/innobackupex_script>`, and then learn :doc:`how to use xtrabackup <xtrabackup_bin/xtrabackup_binary>` for having a better low-level understanding or control of the tool if needed. |
50 | 32 | 36 | ||
51 | === modified file 'storage/innobase/xtrabackup/doc/source/release-notes.rst' | |||
52 | --- storage/innobase/xtrabackup/doc/source/release-notes.rst 2014-03-26 07:39:36 +0000 | |||
53 | +++ storage/innobase/xtrabackup/doc/source/release-notes.rst 2014-11-05 11:10:08 +0000 | |||
54 | @@ -48,3 +48,14 @@ | |||
55 | 48 | :glob: | 48 | :glob: |
56 | 49 | 49 | ||
57 | 50 | release-notes/2.2/* | 50 | release-notes/2.2/* |
58 | 51 | |||
59 | 52 | Percona |XtraBackup| 2.3 | ||
60 | 53 | ========================= | ||
61 | 54 | |||
62 | 55 | .. toctree:: | ||
63 | 56 | :maxdepth: 1 | ||
64 | 57 | :glob: | ||
65 | 58 | |||
66 | 59 | release-notes/2.3/* | ||
67 | 60 | |||
68 | 61 | |||
69 | 51 | 62 | ||
70 | === modified file 'storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.1-alpha1.rst' | |||
71 | --- storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.1-alpha1.rst 2014-03-28 11:46:09 +0000 | |||
72 | +++ storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.1-alpha1.rst 2014-11-05 11:10:08 +0000 | |||
73 | @@ -2,7 +2,7 @@ | |||
74 | 2 | |Percona XtraBackup| 2.2.1-alpha1 | 2 | |Percona XtraBackup| 2.2.1-alpha1 |
75 | 3 | ======================================= | 3 | ======================================= |
76 | 4 | 4 | ||
78 | 5 | Percona is glad to announce the release of |Percona XtraBackup| 2.2.1-alpha1 on March 28th 2014. Downloads are available from our download site `here <http://www.percona.com/downloads/XtraBackup/2.2.1/>`_. This **ALPHA** release, will be available in :ref:`Debian experimental <debian_experimental>` and :ref:`CentOS testing <yum_testing>` repositories. | 5 | Percona is glad to announce the release of |Percona XtraBackup| 2.2.1-alpha1 on March 28th 2014. Downloads are available from our download site `here <http://www.percona.com/downloads/XtraBackup/2.2.1/>`_. This **ALPHA** release, will be available in :ref:`Debian testing <debian_testing>` and :ref:`CentOS testing <yum_testing>` repositories. |
79 | 6 | 6 | ||
80 | 7 | This is an **ALPHA** quality release and it is not intended for production. If you want a high quality, Generally Available release, the current Stable version should be used (currently 2.1.8 in the 2.1 series at the time of writing). | 7 | This is an **ALPHA** quality release and it is not intended for production. If you want a high quality, Generally Available release, the current Stable version should be used (currently 2.1.8 in the 2.1 series at the time of writing). |
81 | 8 | 8 | ||
82 | 9 | 9 | ||
83 | === modified file 'storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.2-beta1.rst' | |||
84 | --- storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.2-beta1.rst 2014-05-06 17:08:06 +0000 | |||
85 | +++ storage/innobase/xtrabackup/doc/source/release-notes/2.2/2.2.2-beta1.rst 2014-11-05 11:10:08 +0000 | |||
86 | @@ -2,7 +2,7 @@ | |||
87 | 2 | |Percona XtraBackup| 2.2.2-beta1 | 2 | |Percona XtraBackup| 2.2.2-beta1 |
88 | 3 | ======================================= | 3 | ======================================= |
89 | 4 | 4 | ||
91 | 5 | Percona is glad to announce the release of |Percona XtraBackup| 2.2.2-beta1 on May 8th 2014. Downloads are available from our download site `here <http://www.percona.com/downloads/XtraBackup/2.2.2/>`_. This **BETA** release will be available in :ref:`Debian experimental <debian_experimental>` and :ref:`CentOS testing <yum_testing>` repositories. | 5 | Percona is glad to announce the release of |Percona XtraBackup| 2.2.2-beta1 on May 8th 2014. Downloads are available from our download site `here <http://www.percona.com/downloads/XtraBackup/2.2.2/>`_. This **BETA** release will be available in :ref:`Debian testing <debian_testing>` and :ref:`CentOS testing <yum_testing>` repositories. |
92 | 6 | 6 | ||
93 | 7 | This is a **BETA** quality release and it is not intended for production. If you want a high quality, Generally Available release, the current Stable version should be used (currently 2.1.9 in the 2.1 series at the time of writing). | 7 | This is a **BETA** quality release and it is not intended for production. If you want a high quality, Generally Available release, the current Stable version should be used (currently 2.1.9 in the 2.1 series at the time of writing). |
94 | 8 | 8 | ||
95 | 9 | 9 | ||
96 | === added directory 'storage/innobase/xtrabackup/doc/source/release-notes/2.3' | |||
97 | === added file 'storage/innobase/xtrabackup/doc/source/release-notes/2.3/2.3.0-alpha1.rst' | |||
98 | --- storage/innobase/xtrabackup/doc/source/release-notes/2.3/2.3.0-alpha1.rst 1970-01-01 00:00:00 +0000 | |||
99 | +++ storage/innobase/xtrabackup/doc/source/release-notes/2.3/2.3.0-alpha1.rst 2014-11-05 11:10:08 +0000 | |||
100 | @@ -0,0 +1,16 @@ | |||
101 | 1 | =================================== | ||
102 | 2 | |Percona XtraBackup| 2.3.0-alpha1 | ||
103 | 3 | =================================== | ||
104 | 4 | |||
105 | 5 | Percona is glad to announce the release of |Percona XtraBackup| 2.3.0-alpha1 on October 30th 2014. Downloads are available from our download site `here <http://www.percona.com/downloads/TESTING/XtraBackup/xtrabackup-2.3.0alpha1/>`_. This **ALPHA** release, will be available in :ref:`Debian testing <debian_testing>` and :ref:`CentOS testing <yum_testing>` repositories. | ||
106 | 6 | |||
107 | 7 | This is an **ALPHA** quality release and it is not intended for production. If you want a high quality, Generally Available release, the current Stable version should be used (currently 2.2.5 in the 2.2 series at the time of writing). | ||
108 | 8 | |||
109 | 9 | New features | ||
110 | 10 | ------------ | ||
111 | 11 | |||
112 | 12 | |Percona XtraBackup| has implemented new tool, :ref:`xbcloud_binary`, which can be used to upload/download full or part of |xbstream| archive from/to cloud. | ||
113 | 13 | |||
114 | 14 | .. note:: | ||
115 | 15 | |||
116 | 16 | In order to sucessfully install Percona Xtrabackup 2.3.0-alpha1 on *CentOS*, ``libev.so.4`` package will need to be installed first. ``libev.so.4`` package can be installed from the `EPEL <https://fedoraproject.org/wiki/EPEL>`_ repositories. | ||
117 | 0 | 17 | ||
118 | === added directory 'storage/innobase/xtrabackup/doc/source/xbcloud' | |||
119 | === added file 'storage/innobase/xtrabackup/doc/source/xbcloud/xbcloud.rst' | |||
120 | --- storage/innobase/xtrabackup/doc/source/xbcloud/xbcloud.rst 1970-01-01 00:00:00 +0000 | |||
121 | +++ storage/innobase/xtrabackup/doc/source/xbcloud/xbcloud.rst 2014-11-05 11:10:08 +0000 | |||
122 | @@ -0,0 +1,87 @@ | |||
123 | 1 | .. _xbcloud_binary: | ||
124 | 2 | |||
125 | 3 | ====================== | ||
126 | 4 | The xbcloud Binary | ||
127 | 5 | ====================== | ||
128 | 6 | |||
129 | 7 | .. note:: | ||
130 | 8 | |||
131 | 9 | This feature implementation is considered **ALPHA** quality. | ||
132 | 10 | |||
133 | 11 | |xbcloud| is a new tool which is part of the |Percona XtraBackup| 2.3.0-alpha1 release. The purpose of |xbcloud| is to download and upload full or part of |xbstream| archive from/to cloud. Archive uploading will employ multipart upload for Amazon and Large Objects on Swift. Along with |xbstream| archive index file will be uploaded which contains list of files and their parts and offsets of those parts in the |xbstream| archive. This index is needed for downloading only part of archive (one or several tables from backups) on demand. | ||
134 | 12 | |||
135 | 13 | Usage | ||
136 | 14 | ----- | ||
137 | 15 | |||
138 | 16 | Backup: :: | ||
139 | 17 | |||
140 | 18 | innobackupex --stream=xbstream /tmp | xbcloud [options] put <name> | ||
141 | 19 | |||
142 | 20 | Following example shows how to make a full backup and upload it to Swift: :: | ||
143 | 21 | |||
144 | 22 | innobackupex --stream=xbstream --extra-lsndir=/tmp /tmp | \ | ||
145 | 23 | xbcloud put --storage=Swift \ | ||
146 | 24 | --swift-container=test \ | ||
147 | 25 | --swift-user=test:tester \ | ||
148 | 26 | --swift-url=http://192.168.8.80:8080/ \ | ||
149 | 27 | --swift-key=testing \ | ||
150 | 28 | --parallel=10 \ | ||
151 | 29 | full_backup | ||
152 | 30 | |||
153 | 31 | Restore: :: | ||
154 | 32 | |||
155 | 33 | xbcloud [options] get <name> [<list-of-files>] | xbstream -x | ||
156 | 34 | |||
157 | 35 | Following example shows how to fetch and restore the backup from Swift: :: | ||
158 | 36 | |||
159 | 37 | xbcloud get --storage=Swift \ | ||
160 | 38 | --swift-container=test \ | ||
161 | 39 | --swift-user=test:tester \ | ||
162 | 40 | --swift-url=http://192.168.8.80:8080/ \ | ||
163 | 41 | --swift-key=testing \ | ||
164 | 42 | full_backup | xbstream -xv -C /tmp/downloaded_full | ||
165 | 43 | |||
166 | 44 | innobackupex --apply-log /tmp/downloaded_full | ||
167 | 45 | innobackupex --copy-back /tmp/downloaded_full | ||
168 | 46 | |||
169 | 47 | Limitations | ||
170 | 48 | ----------- | ||
171 | 49 | |||
172 | 50 | Restoring individual tables from full cloud backup isn't possible without downloading the entire backup. | ||
173 | 51 | |||
174 | 52 | Command-line options | ||
175 | 53 | -------------------- | ||
176 | 54 | |||
177 | 55 | |xbcloud| has following command line options: | ||
178 | 56 | |||
179 | 57 | .. option:: --storage | ||
180 | 58 | |||
181 | 59 | Cloud storage option. Only support for Swift is currently implemented. Default is Swift | ||
182 | 60 | |||
183 | 61 | .. option:: --swift-url | ||
184 | 62 | |||
185 | 63 | URL of Swift cluster | ||
186 | 64 | |||
187 | 65 | .. option:: --swift-user | ||
188 | 66 | |||
189 | 67 | Swift username (X-Auth-User, specific to Swift) | ||
190 | 68 | |||
191 | 69 | .. option:: --swift-key | ||
192 | 70 | |||
193 | 71 | Swift key/password (X-Auth-Key, specific to Swift) | ||
194 | 72 | |||
195 | 73 | .. option:: --swift-container | ||
196 | 74 | |||
197 | 75 | Container to backup into (specific to Swift) | ||
198 | 76 | |||
199 | 77 | .. option:: --parallel=N | ||
200 | 78 | |||
201 | 79 | Maximum number of concurrent upload/download threads. Default is 1. | ||
202 | 80 | |||
203 | 81 | .. option:: --cacert | ||
204 | 82 | |||
205 | 83 | Path to the file with CA certificates | ||
206 | 84 | |||
207 | 85 | .. option:: --insecure | ||
208 | 86 | |||
209 | 87 | Do not verify servers certificate | ||
210 | 0 | 88 | ||
211 | === modified file 'storage/innobase/xtrabackup/innobackupex.pl' | |||
212 | --- storage/innobase/xtrabackup/innobackupex.pl 2014-10-08 16:13:58 +0000 | |||
213 | +++ storage/innobase/xtrabackup/innobackupex.pl 2014-11-05 11:10:08 +0000 | |||
214 | @@ -77,6 +77,8 @@ | |||
215 | 77 | my $have_backup_locks = 0; | 77 | my $have_backup_locks = 0; |
216 | 78 | my $have_galera_enabled = 0; | 78 | my $have_galera_enabled = 0; |
217 | 79 | my $have_flush_engine_logs = 0; | 79 | my $have_flush_engine_logs = 0; |
218 | 80 | my $have_multi_threaded_slave = 0; | ||
219 | 81 | my $have_gtid_slave = 0; | ||
220 | 80 | 82 | ||
221 | 81 | # command line options | 83 | # command line options |
222 | 82 | my $option_help = ''; | 84 | my $option_help = ''; |
223 | @@ -1904,6 +1906,15 @@ | |||
224 | 1904 | 1906 | ||
225 | 1905 | detect_mysql_capabilities_for_backup(\%mysql); | 1907 | detect_mysql_capabilities_for_backup(\%mysql); |
226 | 1906 | 1908 | ||
227 | 1909 | |||
228 | 1910 | # Do not allow --slave-info with a multi-threded non-GTID slave, | ||
229 | 1911 | # see https://bugs.launchpad.net/percona-xtrabackup/+bug/1372679 | ||
230 | 1912 | if ($option_slave_info and $have_multi_threaded_slave | ||
231 | 1913 | and !$have_gtid_slave) { | ||
232 | 1914 | die "The --slave-info option requires GTID enabled for a " . | ||
233 | 1915 | "multi-threaded slave." | ||
234 | 1916 | } | ||
235 | 1917 | |||
236 | 1907 | # | 1918 | # |
237 | 1908 | # if one of the history incrementals is being used, try to grab the | 1919 | # if one of the history incrementals is being used, try to grab the |
238 | 1909 | # innodb_to_lsn from the history table and set the option_incremental_lsn | 1920 | # innodb_to_lsn from the history table and set the option_incremental_lsn |
239 | @@ -2138,21 +2149,26 @@ | |||
240 | 2138 | } | 2149 | } |
241 | 2139 | 2150 | ||
242 | 2140 | # | 2151 | # |
244 | 2141 | # Check if a given directory exists, or fail with an error otherwise | 2152 | # Check if a given directory exists, or create one otherwise. |
245 | 2142 | # | 2153 | # |
246 | 2143 | 2154 | ||
247 | 2144 | sub if_directory_exists { | 2155 | sub if_directory_exists { |
248 | 2145 | my $empty_dir = shift; | 2156 | my $empty_dir = shift; |
249 | 2146 | my $is_directory_empty_comment = shift; | 2157 | my $is_directory_empty_comment = shift; |
250 | 2147 | if (! -d $empty_dir) { | 2158 | if (! -d $empty_dir) { |
252 | 2148 | die "$is_directory_empty_comment directory '$empty_dir' does not exist!"; | 2159 | eval { mkpath($empty_dir) }; |
253 | 2160 | if ($@) { | ||
254 | 2161 | die "Can not create $is_directory_empty_comment directory " . | ||
255 | 2162 | "'$empty_dir': $@"; | ||
256 | 2163 | } | ||
257 | 2149 | } | 2164 | } |
258 | 2150 | } | 2165 | } |
259 | 2151 | 2166 | ||
260 | 2152 | # | 2167 | # |
261 | 2153 | # if_directory_exists_and_empty accepts two arguments: | 2168 | # if_directory_exists_and_empty accepts two arguments: |
262 | 2154 | # variable with directory name and comment. | 2169 | # variable with directory name and comment. |
264 | 2155 | # Sub checks that directory exists and is empty | 2170 | # Sub checks that directory exists and is empty |
265 | 2171 | # or creates one if it doesn't exists. | ||
266 | 2156 | # usage: is_directory_exists_and_empty($directory,"Comment"); | 2172 | # usage: is_directory_exists_and_empty($directory,"Comment"); |
267 | 2157 | # | 2173 | # |
268 | 2158 | 2174 | ||
269 | @@ -2418,7 +2434,7 @@ | |||
270 | 2418 | my $orig_ibdata_dir = get_option_safe('innodb_data_home_dir', | 2434 | my $orig_ibdata_dir = get_option_safe('innodb_data_home_dir', |
271 | 2419 | $orig_datadir); | 2435 | $orig_datadir); |
272 | 2420 | my $orig_innodb_data_file_path = get_option_safe('innodb_data_file_path', | 2436 | my $orig_innodb_data_file_path = get_option_safe('innodb_data_file_path', |
274 | 2421 | ''); | 2437 | 'ibdata1:10M:autoextend'); |
275 | 2422 | my $orig_iblog_dir = get_option_safe('innodb_log_group_home_dir', | 2438 | my $orig_iblog_dir = get_option_safe('innodb_log_group_home_dir', |
276 | 2423 | $orig_datadir); | 2439 | $orig_datadir); |
277 | 2424 | my $orig_undo_dir = get_option_safe('innodb_undo_directory', | 2440 | my $orig_undo_dir = get_option_safe('innodb_undo_directory', |
278 | @@ -3583,6 +3599,11 @@ | |||
279 | 3583 | } else { | 3599 | } else { |
280 | 3584 | $run = 'apply-log'; | 3600 | $run = 'apply-log'; |
281 | 3585 | } | 3601 | } |
282 | 3602 | |||
283 | 3603 | my $now = current_time(); | ||
284 | 3604 | |||
285 | 3605 | print STDERR "$now $prefix Starting the $run operation\n\n"; | ||
286 | 3606 | |||
287 | 3586 | print STDERR "IMPORTANT: Please check that the $run run completes successfully.\n"; | 3607 | print STDERR "IMPORTANT: Please check that the $run run completes successfully.\n"; |
288 | 3587 | print STDERR " At the end of a successful $run run $innobackup_script\n"; | 3608 | print STDERR " At the end of a successful $run run $innobackup_script\n"; |
289 | 3588 | print STDERR " prints \"completed OK!\".\n\n"; | 3609 | print STDERR " prints \"completed OK!\".\n\n"; |
290 | @@ -4917,20 +4938,26 @@ | |||
291 | 4917 | # Query the server to find out what backup capabilities it supports. | 4938 | # Query the server to find out what backup capabilities it supports. |
292 | 4918 | # | 4939 | # |
293 | 4919 | sub detect_mysql_capabilities_for_backup { | 4940 | sub detect_mysql_capabilities_for_backup { |
294 | 4941 | my $con = shift; | ||
295 | 4942 | |||
296 | 4920 | if ($option_incremental) { | 4943 | if ($option_incremental) { |
297 | 4921 | $have_changed_page_bitmaps = | 4944 | $have_changed_page_bitmaps = |
299 | 4922 | mysql_query($_[0], "SELECT COUNT(*) FROM " . | 4945 | mysql_query($con, "SELECT COUNT(*) FROM " . |
300 | 4923 | "INFORMATION_SCHEMA.PLUGINS " . | 4946 | "INFORMATION_SCHEMA.PLUGINS " . |
301 | 4924 | "WHERE PLUGIN_NAME LIKE 'INNODB_CHANGED_PAGES'"); | 4947 | "WHERE PLUGIN_NAME LIKE 'INNODB_CHANGED_PAGES'"); |
302 | 4925 | } | 4948 | } |
303 | 4926 | 4949 | ||
311 | 4927 | if (!defined($_[0]->{vars})) { | 4950 | if (!defined($con->{vars})) { |
312 | 4928 | get_mysql_vars($_[0]); | 4951 | get_mysql_vars($con); |
313 | 4929 | } | 4952 | } |
314 | 4930 | 4953 | ||
315 | 4931 | $have_backup_locks = defined($_[0]->{vars}->{have_backup_locks}); | 4954 | if (!defined($con->{slave_status})) { |
316 | 4932 | 4955 | get_mysql_slave_status($con); | |
317 | 4933 | $have_galera_enabled = defined($_[0]->{vars}->{wsrep_on}); | 4956 | } |
318 | 4957 | |||
319 | 4958 | $have_backup_locks = defined($con->{vars}->{have_backup_locks}); | ||
320 | 4959 | |||
321 | 4960 | $have_galera_enabled = defined($con->{vars}->{wsrep_on}); | ||
322 | 4934 | 4961 | ||
323 | 4935 | if ($option_galera_info && !$have_galera_enabled) { | 4962 | if ($option_galera_info && !$have_galera_enabled) { |
324 | 4936 | my $now = current_time(); | 4963 | my $now = current_time(); |
325 | @@ -4942,7 +4969,7 @@ | |||
326 | 4942 | $option_galera_info = 0; | 4969 | $option_galera_info = 0; |
327 | 4943 | } | 4970 | } |
328 | 4944 | 4971 | ||
330 | 4945 | if ($mysql{vars}->{version}->{Value} =~ m/5\.[123]\.\d/) { | 4972 | if ($con->{vars}->{version}->{Value} =~ m/5\.[123]\.\d/) { |
331 | 4946 | my $now = current_time(); | 4973 | my $now = current_time(); |
332 | 4947 | 4974 | ||
333 | 4948 | print STDERR "\n$now $prefix Warning: FLUSH ENGINE LOGS " . | 4975 | print STDERR "\n$now $prefix Warning: FLUSH ENGINE LOGS " . |
334 | @@ -4954,6 +4981,19 @@ | |||
335 | 4954 | } else { | 4981 | } else { |
336 | 4955 | $have_flush_engine_logs = 1; | 4982 | $have_flush_engine_logs = 1; |
337 | 4956 | } | 4983 | } |
338 | 4984 | |||
339 | 4985 | if (defined($con->{vars}->{slave_parallel_workers}) and | ||
340 | 4986 | ($con->{vars}->{slave_parallel_workers}->{Value} > 0)) { | ||
341 | 4987 | $have_multi_threaded_slave = 1; | ||
342 | 4988 | } | ||
343 | 4989 | |||
344 | 4990 | my $gtid_executed = $con->{slave_status}->{Executed_Gtid_Set}; | ||
345 | 4991 | my $gtid_slave_pos = $con->{vars}->{gtid_slave_pos}; | ||
346 | 4992 | |||
347 | 4993 | if ((defined($gtid_executed) and $gtid_executed ne '') or | ||
348 | 4994 | (defined($gtid_slave_pos) and $gtid_slave_pos ne '')) { | ||
349 | 4995 | $have_gtid_slave = 1; | ||
350 | 4996 | } | ||
351 | 4957 | } | 4997 | } |
352 | 4958 | 4998 | ||
353 | 4959 | # | 4999 | # |
354 | 4960 | 5000 | ||
355 | === modified file 'storage/innobase/xtrabackup/src/xtrabackup.cc' | |||
356 | --- storage/innobase/xtrabackup/src/xtrabackup.cc 2014-10-08 18:33:23 +0000 | |||
357 | +++ storage/innobase/xtrabackup/src/xtrabackup.cc 2014-11-05 11:10:08 +0000 | |||
358 | @@ -2643,6 +2643,8 @@ | |||
359 | 2643 | srv_undo_tablespaces_init(), because fil_is_user_tablespace_id() * | 2643 | srv_undo_tablespaces_init(), because fil_is_user_tablespace_id() * |
360 | 2644 | relies on srv_undo_tablespaces_open to be properly initialized */ | 2644 | relies on srv_undo_tablespaces_open to be properly initialized */ |
361 | 2645 | 2645 | ||
362 | 2646 | msg("xtrabackup: Generating a list of tablespaces\n"); | ||
363 | 2647 | |||
364 | 2646 | err = fil_load_single_table_tablespaces(xb_check_if_open_tablespace); | 2648 | err = fil_load_single_table_tablespaces(xb_check_if_open_tablespace); |
365 | 2647 | if (err != DB_SUCCESS) { | 2649 | if (err != DB_SUCCESS) { |
366 | 2648 | return(err); | 2650 | return(err); |
367 | 2649 | 2651 | ||
368 | === modified file 'storage/innobase/xtrabackup/test/bootstrap.sh' | |||
369 | --- storage/innobase/xtrabackup/test/bootstrap.sh 2014-08-20 08:14:37 +0000 | |||
370 | +++ storage/innobase/xtrabackup/test/bootstrap.sh 2014-11-05 11:10:08 +0000 | |||
371 | @@ -47,12 +47,12 @@ | |||
372 | 47 | 47 | ||
373 | 48 | innodb55) | 48 | innodb55) |
374 | 49 | url="http://s3.amazonaws.com/percona.com/downloads/community" | 49 | url="http://s3.amazonaws.com/percona.com/downloads/community" |
376 | 50 | tarball="mysql-5.5.36-linux2.6-$arch.tar.gz" | 50 | tarball="mysql-5.5.40-linux2.6-$arch.tar.gz" |
377 | 51 | ;; | 51 | ;; |
378 | 52 | 52 | ||
379 | 53 | innodb56) | 53 | innodb56) |
380 | 54 | url="http://s3.amazonaws.com/percona.com/downloads/community" | 54 | url="http://s3.amazonaws.com/percona.com/downloads/community" |
382 | 55 | tarball="mysql-5.6.16-linux-glibc2.5-$arch.tar.gz" | 55 | tarball="mysql-5.6.21-linux-glibc2.5-$arch.tar.gz" |
383 | 56 | ;; | 56 | ;; |
384 | 57 | 57 | ||
385 | 58 | xtradb51) | 58 | xtradb51) |
386 | @@ -62,12 +62,12 @@ | |||
387 | 62 | 62 | ||
388 | 63 | xtradb55) | 63 | xtradb55) |
389 | 64 | url="http://s3.amazonaws.com/percona.com/downloads/community/yassl" | 64 | url="http://s3.amazonaws.com/percona.com/downloads/community/yassl" |
391 | 65 | tarball="Percona-Server-5.5.38-rel35.2-691.Linux.$arch.tar.gz" | 65 | tarball="Percona-Server-5.5.40-rel36.1-707.Linux.$arch.tar.gz" |
392 | 66 | ;; | 66 | ;; |
393 | 67 | 67 | ||
394 | 68 | xtradb56) | 68 | xtradb56) |
395 | 69 | url="http://s3.amazonaws.com/percona.com/downloads/community/yassl" | 69 | url="http://s3.amazonaws.com/percona.com/downloads/community/yassl" |
397 | 70 | tarball="Percona-Server-5.6.19-rel67.0-648.Linux.$arch.tar.gz" | 70 | tarball="Percona-Server-5.6.21-rel69.0-675.Linux.$arch.tar.gz" |
398 | 71 | ;; | 71 | ;; |
399 | 72 | 72 | ||
400 | 73 | mariadb51) | 73 | mariadb51) |
401 | @@ -87,12 +87,12 @@ | |||
402 | 87 | 87 | ||
403 | 88 | mariadb55) | 88 | mariadb55) |
404 | 89 | url="http://s3.amazonaws.com/percona.com/downloads/community" | 89 | url="http://s3.amazonaws.com/percona.com/downloads/community" |
406 | 90 | tarball="mariadb-5.5.32-linux-$arch.tar.gz" | 90 | tarball="mariadb-5.5.40-linux-$arch.tar.gz" |
407 | 91 | ;; | 91 | ;; |
408 | 92 | 92 | ||
409 | 93 | mariadb100) | 93 | mariadb100) |
410 | 94 | url="http://s3.amazonaws.com/percona.com/downloads/community" | 94 | url="http://s3.amazonaws.com/percona.com/downloads/community" |
412 | 95 | tarball="mariadb-10.0.3-linux-$arch.tar.gz" | 95 | tarball="mariadb-10.0.14-linux-$arch.tar.gz" |
413 | 96 | ;; | 96 | ;; |
414 | 97 | 97 | ||
415 | 98 | *) | 98 | *) |
416 | 99 | 99 | ||
417 | === added file 'storage/innobase/xtrabackup/test/t/bug1372679.sh' | |||
418 | --- storage/innobase/xtrabackup/test/t/bug1372679.sh 1970-01-01 00:00:00 +0000 | |||
419 | +++ storage/innobase/xtrabackup/test/t/bug1372679.sh 2014-11-05 11:10:08 +0000 | |||
420 | @@ -0,0 +1,54 @@ | |||
421 | 1 | ######################################################################## | ||
422 | 2 | # Bug #1372679: innobackupex --slave-info doesn't handle | ||
423 | 3 | # slave_parallel_workers>0 | ||
424 | 4 | ######################################################################## | ||
425 | 5 | |||
426 | 6 | require_server_version_higher_than 5.6.0 | ||
427 | 7 | |||
428 | 8 | # Test that --slave-info with MTS enabled + GTID disabled fails | ||
429 | 9 | |||
430 | 10 | MYSQLD_EXTRA_MY_CNF_OPTS=" | ||
431 | 11 | slave_parallel_workers=2 | ||
432 | 12 | " | ||
433 | 13 | master_id=1 | ||
434 | 14 | slave_id=2 | ||
435 | 15 | |||
436 | 16 | start_server_with_id $master_id | ||
437 | 17 | |||
438 | 18 | start_server_with_id $slave_id | ||
439 | 19 | |||
440 | 20 | setup_slave $slave_id $master_id | ||
441 | 21 | |||
442 | 22 | switch_server $slave_id | ||
443 | 23 | |||
444 | 24 | innobackupex --no-timestamp --slave-info $topdir/backup 2>&1 | | ||
445 | 25 | grep 'The --slave-info option requires GTID enabled for a multi-threaded slave' || | ||
446 | 26 | die "could not find the error message" | ||
447 | 27 | |||
448 | 28 | if [[ ${PIPESTATUS[0]} == 0 ]] | ||
449 | 29 | then | ||
450 | 30 | die "innobackupex did not fail as expected" | ||
451 | 31 | fi | ||
452 | 32 | |||
453 | 33 | stop_server_with_id $master_id | ||
454 | 34 | stop_server_with_id $slave_id | ||
455 | 35 | |||
456 | 36 | remove_var_dirs | ||
457 | 37 | |||
458 | 38 | # Test that --slave-info with MTS enabled + GTID enabled works | ||
459 | 39 | |||
460 | 40 | MYSQLD_EXTRA_MY_CNF_OPTS=" | ||
461 | 41 | gtid_mode=on | ||
462 | 42 | log_slave_updates=on | ||
463 | 43 | enforce_gtid_consistency=on | ||
464 | 44 | slave_parallel_workers=2 | ||
465 | 45 | " | ||
466 | 46 | |||
467 | 47 | start_server_with_id $master_id | ||
468 | 48 | start_server_with_id $slave_id | ||
469 | 49 | |||
470 | 50 | setup_slave $slave_id $master_id | ||
471 | 51 | |||
472 | 52 | switch_server $slave_id | ||
473 | 53 | |||
474 | 54 | innobackupex --no-timestamp --slave-info $topdir/backup | ||
475 | 0 | 55 | ||
476 | === added file 'storage/innobase/xtrabackup/test/t/bug1382347.sh' | |||
477 | --- storage/innobase/xtrabackup/test/t/bug1382347.sh 1970-01-01 00:00:00 +0000 | |||
478 | +++ storage/innobase/xtrabackup/test/t/bug1382347.sh 2014-11-05 11:10:08 +0000 | |||
479 | @@ -0,0 +1,39 @@ | |||
480 | 1 | ########################################################################### | ||
481 | 2 | # Bug1382347: innobackupex should create server directories when copy back | ||
482 | 3 | # is performed | ||
483 | 4 | ########################################################################### | ||
484 | 5 | |||
485 | 6 | . inc/common.sh | ||
486 | 7 | |||
487 | 8 | require_server_version_higher_than 5.6.0 | ||
488 | 9 | |||
489 | 10 | mkdir -p ${TEST_VAR_ROOT}/dir/{undo,data,logs} | ||
490 | 11 | |||
491 | 12 | MYSQLD_EXTRA_MY_CNF_OPTS=" | ||
492 | 13 | innodb_file_per_table=1 | ||
493 | 14 | innodb_undo_directory=${TEST_VAR_ROOT}/dir/undo | ||
494 | 15 | innodb_undo_tablespaces=4 | ||
495 | 16 | innodb_data_home_dir=${TEST_VAR_ROOT}/dir/data | ||
496 | 17 | innodb_log_group_home_dir=${TEST_VAR_ROOT}/dir/logs | ||
497 | 18 | " | ||
498 | 19 | |||
499 | 20 | start_server | ||
500 | 21 | load_sakila | ||
501 | 22 | |||
502 | 23 | checksum1=`checksum_table sakila payment` | ||
503 | 24 | test -n "$checksum1" || die "Failed to checksum table sakila.payment" | ||
504 | 25 | |||
505 | 26 | innobackupex --no-timestamp $topdir/backup | ||
506 | 27 | |||
507 | 28 | stop_server | ||
508 | 29 | |||
509 | 30 | rm -rf $MYSQLD_DATADIR | ||
510 | 31 | rm -rf ${TEST_VAR_ROOT}/dir | ||
511 | 32 | |||
512 | 33 | innobackupex --apply-log $topdir/backup | ||
513 | 34 | innobackupex --copy-back $topdir/backup | ||
514 | 35 | |||
515 | 36 | start_server | ||
516 | 37 | |||
517 | 38 | checksum2=`checksum_table sakila payment` | ||
518 | 39 | test -n "$checksum2" || die "Failed to checksum table sakila.payment" | ||
519 | 0 | 40 | ||
520 | === added file 'storage/innobase/xtrabackup/test/t/bug369913.sh' | |||
521 | --- storage/innobase/xtrabackup/test/t/bug369913.sh 1970-01-01 00:00:00 +0000 | |||
522 | +++ storage/innobase/xtrabackup/test/t/bug369913.sh 2014-11-05 11:10:08 +0000 | |||
523 | @@ -0,0 +1,15 @@ | |||
524 | 1 | ############################################################################# | ||
525 | 2 | # Bug #369913: Feature Request: more verbose output during initial table scan | ||
526 | 3 | ############################################################################# | ||
527 | 4 | |||
528 | 5 | start_server | ||
529 | 6 | |||
530 | 7 | innobackupex --no-timestamp $topdir/backup | ||
531 | 8 | |||
532 | 9 | egrep -q \ | ||
533 | 10 | '[0-9]{6} [0-9]{2}:[0-9]{2}:[0-9]{2} .* Starting the backup operation' \ | ||
534 | 11 | $OUTFILE \ | ||
535 | 12 | || die "Could not find the operation start message" | ||
536 | 13 | |||
537 | 14 | grep -q "xtrabackup: Generating a list of tablespaces" $OUTFILE \ | ||
538 | 15 | || die "Could not find \"Generating a list of tablespaces\" message" | ||
539 | 0 | 16 | ||
540 | === added file 'storage/innobase/xtrabackup/test/t/innodb_data_home_dir.sh' | |||
541 | --- storage/innobase/xtrabackup/test/t/innodb_data_home_dir.sh 1970-01-01 00:00:00 +0000 | |||
542 | +++ storage/innobase/xtrabackup/test/t/innodb_data_home_dir.sh 2014-11-05 11:10:08 +0000 | |||
543 | @@ -0,0 +1,33 @@ | |||
544 | 1 | ############################################################################## | ||
545 | 2 | # Test innodb_data_file_dir support | ||
546 | 3 | ############################################################################## | ||
547 | 4 | |||
548 | 5 | . inc/common.sh | ||
549 | 6 | |||
550 | 7 | mkdir -p ${TEST_VAR_ROOT}/dir/data | ||
551 | 8 | |||
552 | 9 | MYSQLD_EXTRA_MY_CNF_OPTS=" | ||
553 | 10 | innodb_file_per_table=1 | ||
554 | 11 | innodb_data_home_dir=${TEST_VAR_ROOT}/dir/data | ||
555 | 12 | " | ||
556 | 13 | |||
557 | 14 | start_server | ||
558 | 15 | load_sakila | ||
559 | 16 | |||
560 | 17 | checksum1=`checksum_table sakila payment` | ||
561 | 18 | test -n "$checksum1" || die "Failed to checksum table sakila.payment" | ||
562 | 19 | |||
563 | 20 | innobackupex --no-timestamp $topdir/backup | ||
564 | 21 | |||
565 | 22 | stop_server | ||
566 | 23 | |||
567 | 24 | rm -rf $MYSQLD_DATADIR/* | ||
568 | 25 | rm -rf ${TEST_VAR_ROOT}/dir/data/* | ||
569 | 26 | |||
570 | 27 | innobackupex --apply-log $topdir/backup | ||
571 | 28 | innobackupex --copy-back $topdir/backup | ||
572 | 29 | |||
573 | 30 | start_server | ||
574 | 31 | |||
575 | 32 | checksum2=`checksum_table sakila payment` | ||
576 | 33 | test -n "$checksum2" || die "Failed to checksum table sakila.payment" |
Hrvoje,
Please rebase this on the current PXB trunk (which is now based on 2.3) and resubmit to exclude unrelated revisions.