Merge lp:~hrvojem/percona-xtrabackup/bug1242278-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: 687
Proposed branch: lp:~hrvojem/percona-xtrabackup/bug1242278-2.1
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 158 lines (+70/-23)
3 files modified
doc/source/innobackupex/incremental_backups_innobackupex.rst (+1/-1)
doc/source/xtrabackup_bin/incremental_backups_with_ps_56.rst (+65/-18)
doc/source/xtrabackup_bin/xbk_option_reference.rst (+4/-4)
To merge this branch: bzr merge lp:~hrvojem/percona-xtrabackup/bug1242278-2.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+194175@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/incremental_backups_innobackupex.rst'
2--- doc/source/innobackupex/incremental_backups_innobackupex.rst 2013-04-29 09:29:00 +0000
3+++ doc/source/innobackupex/incremental_backups_innobackupex.rst 2013-11-06 16:06:25 +0000
4@@ -17,7 +17,7 @@
5
6 $ innobackupex /data/backups
7
8-This will create a timestamped directory in :file:`/data/backups`. Assuming that the backup is done last day of the year, ``BASEDIR`` would be :file:`/data/backups/2013-03-31_23-01-18`, for example.
9+This will create a timestamped directory in :file:`/data/backups`. Assuming that the backup is done last day of the month, ``BASEDIR`` would be :file:`/data/backups/2013-03-31_23-01-18`, for example.
10
11 .. note:: You can use the :option:`innobackupex --no-timestamp` option to override this behavior and the backup will be created in the given directory.
12
13
14=== modified file 'doc/source/xtrabackup_bin/incremental_backups_with_ps_56.rst'
15--- doc/source/xtrabackup_bin/incremental_backups_with_ps_56.rst 2013-09-19 13:06:49 +0000
16+++ doc/source/xtrabackup_bin/incremental_backups_with_ps_56.rst 2013-11-06 16:06:25 +0000
17@@ -20,7 +20,7 @@
18
19 To make an incremental backup, begin with a full backup as usual. The |xtrabackup| binary writes a file called :file:`xtrabackup_checkpoints` into the backup's target directory. This file contains a line showing the ``to_lsn``, which is the database's :term:`LSN` at the end of the backup. :doc:`Create the full backup <creating_a_backup>` with a command such as the following: ::
20
21- xtrabackup --backup --target-dir=/data/backup/ --datadir=/var/lib/mysql/
22+ xtrabackup_56 --backup --target-dir=/data/backup/ --datadir=/var/lib/mysql/
23
24 If you want a usable full backup, use :doc:`innobackupex <../innobackupex/innobackupex_script>` since `xtrabackup` itself won't copy table definitions, triggers, or anything else that's not .ibd.
25
26@@ -28,42 +28,89 @@
27
28 backup_type = full-backuped
29 from_lsn = 0
30- to_lsn = 2066277743
31- last_lsn = 2066277743
32+ to_lsn = 1546908388
33+ last_lsn = 1574827339
34 compact = 0
35
36 Using the Log Archiving to prepare the backup
37 =============================================
38
39-In order to prepare the backup we need to specify the directory that contains the archived logs with the :option:`xtrabackup --archived-logs-dir` option: ::
40+In order to prepare the backup we need to specify the directory that contains the archived logs with the :option:`xtrabackup --innodb-log-arch-dir` option: ::
41
42- xtrabackup --prepare --target-dir=/data/backup/ --archived-logs-dir=/data/archived-logs/
43+ xtrabackup_56 --prepare --target-dir=/data/backup/ --innodb-log-arch-dir=/data/archived-logs/
44
45 This command will use archived logs, replay them against the backup folder and bring them up to date with the latest archived log.
46
47 Output should look like this: ::
48
49- InnoDB: Doing recovery: scanned up to log sequence number 712612864 (0 %)
50- InnoDB: Doing recovery: scanned up to log sequence number 717855744 (0 %)
51- InnoDB: Doing recovery: scanned up to log sequence number 723098624 (1 %)
52- InnoDB: Doing recovery: scanned up to log sequence number 728341504 (1 %)
53- ...
54- InnoDB: Apply batch completed
55- InnoDB: Doing recovery: scanned up to log sequence number 2066277743 (99 %)
56- 130919 8:12:44 InnoDB: Starting an apply batch of log records to the database...
57- InnoDB: Progress in percents: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
58- InnoDB: Apply batch completed
59- 130919 8:12:45 Percona XtraDB (http://www.percona.com) 5.1.70-14.6 started; log sequence number 2066277743
60+ xtrabackup_56 version 2.1.5 for MySQL server 5.6.11 Linux (x86_64) (revision id: 680)
61+ xtrabackup: cd to /tmp/backup-01/
62+ xtrabackup: using the following InnoDB configuration for recovery:
63+ xtrabackup: innodb_data_home_dir = ./
64+ xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
65+ xtrabackup: innodb_log_group_home_dir = ./
66+ xtrabackup: innodb_log_files_in_group = 2
67+ xtrabackup: innodb_log_file_size = 50331648
68+ InnoDB: Allocated tablespace 4, old maximum was 0
69+ xtrabackup: using the following InnoDB configuration for recovery:
70+ xtrabackup: innodb_data_home_dir = ./
71+ xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
72+ xtrabackup: innodb_log_group_home_dir = ./
73+ xtrabackup: innodb_log_files_in_group = 2
74+ xtrabackup: innodb_log_file_size = 50331648
75+ xtrabackup: Starting InnoDB instance for recovery.
76+ xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
77+ InnoDB: The InnoDB memory heap is disabled
78+ InnoDB: Mutexes and rw_locks use GCC atomic builtins
79+ InnoDB: Compressed tables use zlib 1.2.3
80+ InnoDB: Not using CPU crc32 instructions
81+ InnoDB: Initializing buffer pool, size = 100.0M
82+ InnoDB: Completed initialization of buffer pool
83+ InnoDB: Setting log file ./ib_logfile101 size to 48 MB
84+ InnoDB: Setting log file ./ib_logfile1 size to 48 MB
85+ InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
86+ InnoDB: New log files created, LSN=1627148
87+ InnoDB: Starting archive recovery from a backup...
88+ InnoDB: Allocated tablespace 4, old maximum was 0
89+ InnoDB: Opened archived log file /var/lib/mysql/ib_log_archive_00000000000000045568
90+ InnoDB: Starting an apply batch of log records to the database...
91+ InnoDB: Progress in percent: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
92+
93+ ...
94+
95+ InnoDB: Apply batch completed
96+ InnoDB: Starting an apply batch of log records to the database...
97+ InnoDB: Progress in percent: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
98+ InnoDB: Apply batch completed
99+ InnoDB: 1 transaction(s) which must be rolled back or cleaned up
100+ InnoDB: in total 5063 row operations to undo
101+ InnoDB: Trx id counter is 4096
102+
103+ [notice (again)]
104+ If you use binary log and don't use any hack of group commit,
105+ the binary log position seems to be:
106+
107+ xtrabackup: starting shutdown with innodb_fast_shutdown = 1
108+ InnoDB: Starting shutdown...
109+ InnoDB: Shutdown completed; log sequence number 2013229561
110
111 After this is completed successfully backup can be restored.
112
113+You can check the :file:`xtrabackup_checkpoints` file and see that the backup_type has changed: ::
114+
115+ backup_type = full-prepared
116+ from_lsn = 0
117+ to_lsn = 1546908388
118+ last_lsn = 1574827339
119+ compact = 0
120+
121 .. note::
122
123- Archived logs can be applied to backup data several times, for example to decreasing backup size or time required for preparing the backup.
124+ Archived logs can be applied to backup data several times, for example to decrease the backup size or time required for preparing the backup.
125
126 Additional option is available if you need to restore a backup to specific point in time. By adding the :option:`xtrabackup --to-archived-lsn` option you can specify the LSN to which the backup will be prepared. ::
127
128- xtrabackup --prepare --target-dir=/data/backup/ --archived-logs-dir=/data/archived-logs/ --to-archived-lsn=8155020800
129+ xtrabackup_56 --prepare --target-dir=/data/backup/ --innodb-log-arch-dir=/data/archived-logs/ --to-archived-lsn=5536301566
130
131 This will prepare the backup up to the specified Log Sequence Number.
132
133
134=== modified file 'doc/source/xtrabackup_bin/xbk_option_reference.rst'
135--- doc/source/xtrabackup_bin/xbk_option_reference.rst 2013-09-19 13:06:49 +0000
136+++ doc/source/xtrabackup_bin/xbk_option_reference.rst 2013-11-06 16:06:25 +0000
137@@ -13,10 +13,6 @@
138
139 This option causes only the redo stage to be performed when preparing a backup. It is very important for incremental backups.
140
141-.. option:: --archived-logs-dir
142-
143- This option is used to specify the directory containing the archived logs. It can only be used with the :option:`xtrabackup --prepare` option.
144-
145 .. option:: --backup
146
147 Make a backup and place it in :option:`--target-dir`. See :doc:`Creating a backup <creating_a_backup>`.
148@@ -81,6 +77,10 @@
149
150 When creating an incremental backup, you can specify the log sequence number (:term:`LSN`) instead of specifying :option:`--incremental-basedir`. For databases created by *MySQL* and *Percona Server* 5.0-series versions, specify the :term:`LSN` as two 32-bit integers in high:low format. For databases created in 5.1 and later, specify the :term:`LSN` as a single 64-bit integer. ##ATTENTION##: If a wrong LSN value is specified, it is impossible to diagnose this, causing the backup to be unusable. Be careful!
151
152+.. option:: --innodb-log-arch-dir
153+
154+ This option is used to specify the directory containing the archived logs. It can only be used with the :option:`xtrabackup --prepare` option.
155+
156 .. option:: --innodb-miscellaneous
157
158 There is a large group of InnoDB options that are normally read from the :term:`my.cnf` configuration file, so that xtrabackup boots up its embedded InnoDB in the same configuration as your current server. You normally do not need to specify these explicitly. These options have the same behavior that they have in InnoDB or XtraDB. They are as follows: ::

Subscribers

People subscribed via source and target branches