blob: a1bec6b89c77ed77b7e0e48c16e91cd9c9b6d6e1 [file] [log] [blame]
Jiri Broulik634ea8a2017-05-31 17:10:03 +02001
2===================
3xtrabackup formula
4===================
5
6Xtrabackup allows you to backup and restore databases from full backups or full backups and its incrementals.
7
8
9Sample pillars
10==============
11
12Backup client with ssh/rsync remote host
13
14.. code-block:: yaml
15
16 xtrabackup:
17 client:
18 enabled: true
19 full_backups_to_keep: 3
20 hours_before_full: 48
21 hours_before_incr: 12
22 database:
23 user: username
24 password: password
25 target:
26 host: cfg01
27
28 .. note:: full_backups_to_keep param states how many backup will be stored locally on xtrabackup client.
29 More options to relocate local backups can be done using salt-formula-backupninja.
30
31
32Backup client with local backup only
33
34.. code-block:: yaml
35
36 xtrabackup:
37 client:
38 enabled: true
39 full_backups_to_keep: 3
40 hours_before_full: 48
41 hours_before_incr: 12
42 database:
43 user: username
44 password: password
45
46 .. note:: full_backups_to_keep param states how many backup will be stored locally on xtrabackup client
47
48
49Backup client with ssh/rsync remote host with compression:
50
51.. code-block:: yaml
52
53 xtrabackup:
54 client:
55 enabled: true
56 full_backups_to_keep: 3
57 hours_before_full: 48
58 hours_before_incr: 12
59 compression: true
60 compression_threads: 2
61 database:
62 user: username
63 password: password
64 target:
65 host: cfg01
66
67 .. note:: More options to relocate local backups can be done using salt-formula-backupninja.
68
69
70Backup server rsync
71
72.. code-block:: yaml
73
74 xtrabackup:
75 server:
76 enabled: true
77 hours_before_full: 48
78 full_backups_to_keep: 5
79 key:
80 xtrabackup_pub_key:
81 enabled: true
82 key: key
83
84 .. note:: hours_before_full param should have the same value as is stated on xtrabackup client
85
86
87Client restore from local backups:
88
89.. code-block:: yaml
90
91 xtrabackup:
92 client:
93 enabled: true
94 full_backups_to_keep: 5
95 hours_before_full: 48
96 hours_before_incr: 12
97 restore_full_latest: 1
98 restore_from: local
99 compression: true
100 compressThreads: 2
101 database:
102 user: username
103 password: password
104 target:
105 host: cfg01
106 qpress:
107 source: tar
108 name: url
109
110 .. note:: restore_full_latest param with a value of 1 means to restore db from the last full backup and its increments. 2 would mean to restore second latest full backup and its increments
111
112
113Client restore from remote backups:
114
115.. code-block:: yaml
116
117 xtrabackup:
118 client:
119 enabled: true
120 full_backups_to_keep: 5
121 hours_before_full: 48
122 hours_before_incr: 12
123 restore_full_latest: 1
124 restore_from: remote
125 compression: true
126 compressThreads: 2
127 database:
128 user: username
129 password: password
130 target:
131 host: cfg01
132 qpress:
133 source: tar
134 name: url
135
136 .. note:: restore_full_latest param with a value of 1 means to restore db from the last full backup and its increments. 2 would mean to restore second latest full backup and its increments
137
138
139More information
140================
141
142* https://labs.riseup.net/code/projects/xtrabackup/wiki/Configuration
143* http://www.debian-administration.org/articles/351
144* http://duncanlock.net/blog/2013/08/27/comprehensive-linux-backups-with-etckeeper-xtrabackup/
145* https://github.com/riseuplabs/puppet-xtrabackup
146* http://www.ushills.co.uk/2008/02/backup-with-xtrabackup.html
147
148
149Documentation and Bugs
150======================
151
152To learn how to install and update salt-formulas, consult the documentation
153available online at:
154
155 http://salt-formulas.readthedocs.io/
156
157In the unfortunate event that bugs are discovered, they should be reported to
158the appropriate issue tracker. Use Github issue tracker for specific salt
159formula:
160
161 https://github.com/salt-formulas/salt-formula-xtrabackup/issues
162
163For feature requests, bug reports or blueprints affecting entire ecosystem,
164use Launchpad salt-formulas project:
165
166 https://launchpad.net/salt-formulas
167
168You can also join salt-formulas-users team and subscribe to mailing list:
169
170 https://launchpad.net/~salt-formulas-users
171
172Developers wishing to work on the salt-formulas projects should always base
173their work on master branch and submit pull request against specific formula.
174
175 https://github.com/salt-formulas/salt-formula-xtrabackup
176
177Any questions or feedback is always welcome so feel free to join our IRC
178channel:
179
180 #salt-formulas @ irc.freenode.net
181