1mysql‐zrm(1)
2mysql‐zrm(1)
3
4
5
6NNAAMMEE
7 mmyyssqqll‐‐zzrrmm ‐ Backup and recovery utility for ZRM for MySQL
8
9SSYYNNOOPPSSIISS
10 mmyyssqqll‐‐zzrrmm ‐‐‐‐aaccttiioonn [ bbaacckkuupp | rreessttoorree | sscchheedduullee‐‐bbaacckkuupp |
11rreeppoorrtt | lliisstt
12 | ppuurrggee | ppaarrssee‐‐bbiinnllooggss | cchheecckk | vveerriiffyy‐‐bbaacckkuupp |
13eexxttrraacctt‐‐bbaacckkuupp |
14 aabboorrtt‐‐bbaacckkuupp ]
15
16
17DDEESSCCRRIIPPTTIIOONN
18 ZRM for MySQL provides automated scheduling of live
19MySQL database
20 backup. You only need to configure it once to reflect the
21MySQL deploy‐
22 ment, then schedule it to run unattended backups. Vari‐
23ous options can
24 help an administrator:
25
26 * Verify the backups created.
27
28 * Generate various types of reports about the backups cre‐
29ated.
30
31 * Specify compression and encryption as desired.
32
33 * Report information about the backups via an email or RSS
34feed.
35
36 * Access pre‐ and post‐ backup plugins to extend the suite
37further.
38
39 * Control full and selective restore operations on the
40database, both
41 locally and remotely.
42
43 ZRM for MySQL’s primary command line utility is
44mmyyssqqll‐‐zzrrmm, which pro‐
45 vides the core backup/restore functions for MySQL data‐
46bases.
47
48 Use the mmyyssqqll‐‐zzrrmm..ccoonnff(5) configuration file to set
49mmyyssqqll‐‐zzrrmm options.
50 Use the ‐‐‐‐aaccttiioonn cchheecckk option to verify the configuration
51of mmyyssqqll‐‐zzrrmm.
52
53 Use mmyyssqqll‐‐zzrrmm to create full or incremental backups of
54MySQL databases
55 and perform full, incremental and selective restores
56as well. The
57 ‐‐‐‐lliisstt option provides information about prior backups.
58
59 To display help on individual action options, append the
60‐‐‐‐hheellpp option
61 to the appropriate command line. For example: mmyyssqqll‐‐zzrrmm
62‐‐‐‐aaccttiioonn bbaacckkuupp
63 ‐‐‐‐hheellpp For more detailed help, see the ZRM for MySQL doc‐
64umentation at
65 http://mysqlbackup.zmanda.com.
66
67
68BBAACCKKUUPP SSEETTSS
69 ZRM for MySQL organizes the backups into ’backup sets.’
70Each backup set
71 defines:
72
73 * a list of database(s) or table(s) within a database to
74back up
75
76 * backup options to use on this backup set
77
78 * scheduling options to use on this backup set.
79
80 Backup sets are identified by a unique name.
81
82
83 Every backup run (each time mmyyssqqll‐‐zzrrmm is executed) is as‐
84sociated with
85 one backup set. Various parameters can be associated
86with each backup
87 run.
88
89 mmyyssqqll‐‐zzrrmm first reads the global configu‐
90ration file
91 (//eettcc//mmyyssqqll‐‐zzrrmm//mmyyssqqll‐‐zzrrmm..ccoonnff). The global configura‐
92tion file can be
93 overridden by any backup set configuration file
94stored in
95 //eettcc//mmyyssqqll‐‐zzrrmm//_b_a_c_k_u_p _s_e_t _n_a_m_e/ directory. The mmyyssqqll‐‐zzrrmm
96command line
97 options will override the parameters specified in the
98configuration
99 files.
100
101
102BBAACCKKUUPP MMEETTHHOODDSS
103 mmyyssqqll‐‐zzrrmm backups can be either full or incremental.
104Full backups can
105 be logical backups or raw backups. Logical backups con‐
106tain SQL state‐
107 ments to recreate the database. Raw backups are actual
108copies of the
109 database files.
110
111 When logical backup is specified, the utility uses only
112mmyyssqqlldduummpp for
113 backing up specified databases and tables.
114
115 When raw backup is specified, the utility has the
116ability to decide
117 which backup mechanism to use for a particular database.
118If there are
119 no transactional storage engine based tables in the speci‐
120fied database,
121 it uses mmyyssqqllhhoottccooppyy for backing up that database. Other‐
122wise, it uses
123 mmyyssqqlldduummpp for backing up the specified database.
124
125 An index file is also created in the backup directory.
126The index con‐
127 tains the details of what was backed up, how much data was
128backed up,
129 what parameters were used to backup the data, how much
130time it took to
131 backup etc.
132
133
134RREECCOOVVEERRYY
135 When restoring databases, only the aallll‐‐ddaattaabbaasseess and
136ddaattaabbaasseess options
137 are allowed. In the case of clusters, only the
138aallll‐‐ddaattaabbaasseess option is
139 allowed.
140
141 When the backup contains only specific tables from a data‐
142base, you need
143 to specify mmyyssqqll‐‐zzrrmm action as restore and the database
144name to restore
145 the backed up tables. Tables not included in the backup
146but present in
147 the database will be left untouched.
148
149
150AACCTTIIOONNSS
151 Specify bbaacckkuupp to initiate a backup run.
152
153 Use rreessttoorree to restore from a specified backup.
154
155 Use sscchheedduullee‐‐bbaacckkuupp to setup the schedule for the backup.
156
157 specify rreeppoorrtt to generate reports on backup runs.
158
159 Use cchheecckk to verify if a backup set configuration is cor‐
160rect.
161
162 Use lliisstt to display the backup level, the name of the
163directory con‐
164 taining the backup and the index of the last backup of
165the specified
166 backup set.
167
168 Action ppaarrssee‐‐bbiinnllooggss will display the parsed output of the
169binary logs.
170 This is useful to find out the log positions and/or
171timestamp to be
172 used for restore operations.
173
174 Specify ppuurrggee to remove backups present in the directory
175specified by
176 the destination option whose retention policy has been ex‐
177ceeded.
178
179 Specify vveerriiffyy‐‐bbaacckkuupp to verify a backup
180
181 Use eexxttrraacctt‐‐bbaacckkuupp to uncompress/decrypt a specified back‐
182up
183
184 Specify aabboorrtt‐‐bbaacckkuupp to abort the backup run for a given
185backup‐set.
186
187
188OOPPTTIIOONNSS
189 ‐‐‐‐aaccttiioonn bbaacckkuupp | rreessttoorree | sscchheedduullee‐‐bbaacckkuupp | rreeppoorrtt |
190 lliisstt | ppuurrggee | ppaarrssee‐‐bbiinnllooggss | cchheecckk |
191vveerriiffyy‐‐bbaacckkuupp |
192 eexxttrraacctt‐‐bbaacckkuupp | aabboorrtt‐‐bbaacckkuupp
193
194 These mutually exclusive ‐‐‐‐aaccttiioonn options choose
195the basic func‐
196 tionality of the utility. This form cannot be
197used in the con‐
198 figuration file.
199
200
201
202FFIILLEESS
203 //vvaarr//lliibb//mmyyssqqll‐‐zzrrmm
204 Directory under which all backup data is stored.
205
206
207 //eettcc//mmyyssqqll‐‐zzrrmm//_b_a_c_k_u_p _s_e_t _n_a_m_e//mmyyssqqll‐‐zzrrmm..ccoonnff
208 Configuration file ZRM for MySQL.
209
210
211RREETTUURRNN VVAALLUUEESS
212 On success, zero is returned. On error, non‐zero value is
213returned.
214
215
216SSEEEE AALLSSOO
217 mysql‐zrm‐backup(1), mysql‐zrm‐manage‐backup(1), mysql‐
218zrm‐restore(1),
219 mysql‐zrm‐check(1), mysql‐zrm‐list(1), mysql‐zrm‐
220parse‐binlogs(1),
221 mysql‐zrm‐purge(1), mysql‐zrm‐extract‐backup(1),
222mysql‐zrm‐ver‐
223 ify‐backup(1), mysql‐zrm‐abort‐backup(1), mysql‐zrm‐
224scheduler(1),
225 mysql‐zrm‐reporter(1), mysql‐zrm.conf(5), mysqldump(1),
226mysqlbinlog(1),
227 mysql(1), lvm(8), Zmanda Recovery Manager for MySQL
228(http://mysql‐
229 backup.zmanda.com/)
230
231
232AAUUTTHHOORR
233 Zmanda Inc. (http://www.zmanda.com)
234
235
236
237Zmanda, Inc. ZRM for MySQL 2.1
238mysql‐zrm(1)
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264