blob: a05787b7ec759dfa6461f740edea4ae9201591d8 [file] [log] [blame]
Filip Pytloun311d79c2015-10-06 16:28:31 +02001
Ales Komarek7c8d2c92017-02-21 12:18:05 +01002===================
3Backupninja formula
4===================
Filip Pytloun311d79c2015-10-06 16:28:31 +02005
Ales Komarek7c8d2c92017-02-21 12:18:05 +01006Backupninja allows you to coordinate system backup by dropping a few simple
7configuration files into /etc/backup.d/. Most programs you might use for
8making backups don't have their own configuration file format.
Filip Pytloun311d79c2015-10-06 16:28:31 +02009
Ales Komarek7c8d2c92017-02-21 12:18:05 +010010Backupninja provides a centralized way to configure and schedule many
11different backup utilities. It allows for secure, remote, incremental
12filesytem backup (via rdiff-backup), compressed incremental data, backup
13system and hardware info, encrypted remote backups (via duplicity), safe
14backup of MySQL/PostgreSQL databases, subversion or trac repositories, burn
15CD/DVDs or create ISOs, incremental rsync with hardlinking.
16
Filip Pytloun311d79c2015-10-06 16:28:31 +020017
18Sample pillars
19==============
20
21Backup client with ssh/rsync remote target
22
jan kaufmand6315512016-02-03 21:19:09 +010023.. code-block:: yaml
24
Filip Pytloun311d79c2015-10-06 16:28:31 +020025 backupninja:
26 client:
27 enabled: true
28 target:
29 engine: rsync
30 host: 10.10.10.208
31 user: backupninja
32
Jiri Broulik1b693c62018-03-02 15:15:46 +010033Backup client with ssh/rsync remote target with specific rsync options
34
35.. code-block:: yaml
36
37 backupninja:
38 client:
39 enabled: true
40 target:
41 engine: rsync
42 engine_opts: "-av --delete --recursive --safe-links"
Jiri Broulika0bab442018-03-02 18:16:13 +010043 home_dir: /srv/volumes/backup/backupninja
Jiri Broulik1b693c62018-03-02 15:15:46 +010044 host: 10.10.10.208
45 user: backupninja
46
Filip Pytloun311d79c2015-10-06 16:28:31 +020047Backup client with s3 remote target
48
jan kaufmand6315512016-02-03 21:19:09 +010049.. code-block:: yaml
50
Filip Pytloun311d79c2015-10-06 16:28:31 +020051 backupninja:
52 client:
53 enabled: true
54 target:
Michael Kutý4896b922016-10-23 22:52:40 +020055 engine: dup
56 url: s3+http://bucket-name/folder-name
57 auth:
58 awsaccesskeyid: awsaccesskeyid
59 awssecretaccesskey: awssecretaccesskey
Filip Pytloun311d79c2015-10-06 16:28:31 +020060
jan kaufmanc1b21592016-01-28 14:03:03 +010061Backup client with webdav target
62
jan kaufmand6315512016-02-03 21:19:09 +010063.. code-block:: yaml
64
jan kaufmanc1b21592016-01-28 14:03:03 +010065 backupninja:
66 client:
67 enabled: true
68 target:
Filip Pytloun7306f702016-02-05 17:31:18 +010069 engine: dup
Filip Pytloun6ce66eb2016-02-05 17:03:00 +010070 url: webdavs://backup.cloud.example.com/box.example.com/
jan kaufman0b9fdb52016-02-04 15:55:08 +010071 auth:
72 gss:
73 principal: host/${linux:network:fqdn}
74 keytab: /etc/krb5.keytab
jan kaufmanc1b21592016-01-28 14:03:03 +010075
Martin Polreich41ee69c2018-03-05 13:17:02 +010076Backup client with exact backup times
77
78
79.. note:: This settings will configure global backupninja backup to be
80 triggered at exactly set times.
81
82.. code-block:: yaml
83
84 backupninja:
85 client:
86 enabled: true
87 auto_backup_disabled: false
88 backup_times:
89 day_of_week: 1
90 hour: 2
91 minute: 32
92
93.. note:: This will trigger backup every monday at 2:32 AM.
94
95.. code-block:: yaml
96
97 backupninja:
98 client:
99 enabled: true
100 auto_backup_disabled: false
101 backup_times:
102 day_of_month: 24
103 hour: 14
104 minute: 12
105
106.. note:: This will trigger backup every 24th day of every month at 14:12 (2:12 PM).
107
108.. note:: Available parameters:
109 ``day_of_week`` (0, 3, 6 ...). If not set, defaults to '*'.
110 ``day_of_month`` (20, 25, 12, ...). If not set, defaults to '*'.
111 Only ``day_of_week`` or ``day_of_month`` can be defined at the same time.
112 ``hour`` (1, 10, 15, ...). If not defined, defaults to `1`. Uses 24 hour format.
113 ``minute`` (5, 10, 59, ...). If not defined, defaults to `00`.
114
115..note:: Parameter ``auto_backup_disabled`` is optional. It disables automatic
116 backup when set to true. It's set to ``false``by default when not defined.
117
Martin Polreiched7b5c92018-03-21 11:49:37 +0100118Backup client with defined number of backups to keep:
119
120..code-block:: yaml
121
122 backupninja:
123 client:
124 enabled: true
125 engine: rsync
126 host: 10.10.10.208
127 user: backupninja
128 keep: 4
129
130 ..note:: The ``keep`` parameter defines number of backups to keep. If not
131 defined it's set to ``7`` by default.
132
Filip Pytloun311d79c2015-10-06 16:28:31 +0200133Backup server rsync/rdiff
134
jan kaufmand6315512016-02-03 21:19:09 +0100135.. code-block:: yaml
136
Filip Pytloun311d79c2015-10-06 16:28:31 +0200137 backupninja:
138 server:
139 enabled: true
140 rdiff: true
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100141 key:
142 client1.domain.com:
Jiri Broulik70715332017-04-27 22:04:41 +0200143 enabled: true
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100144 key: ssh-key
Filip Pytloun311d79c2015-10-06 16:28:31 +0200145
Jiri Broulik34dc3da2018-02-27 11:07:11 +0100146Backup server without strict client policy restriction
147
148.. code-block:: yaml
149
150 backupninja:
151 server:
152 restrict_clients: false
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100153
Andrey21ff9022017-10-12 09:54:09 -0500154Backup client with local storage
155
156.. code-block:: yaml
157
158 backupninja:
159 client:
160 enabled: true
161 target:
162 engine: local
163
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100164More information
165================
Filip Pytloun311d79c2015-10-06 16:28:31 +0200166
167* https://labs.riseup.net/code/projects/backupninja/wiki/Configuration
168* http://www.debian-administration.org/articles/351
169* http://duncanlock.net/blog/2013/08/27/comprehensive-linux-backups-with-etckeeper-backupninja/
170* https://github.com/riseuplabs/puppet-backupninja
171* http://www.ushills.co.uk/2008/02/backup-with-backupninja.html
Filip Pytloun68f73d32017-02-02 13:02:03 +0100172
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100173
Filip Pytloun68f73d32017-02-02 13:02:03 +0100174Documentation and Bugs
175======================
176
177To learn how to install and update salt-formulas, consult the documentation
178available online at:
179
180 http://salt-formulas.readthedocs.io/
181
182In the unfortunate event that bugs are discovered, they should be reported to
183the appropriate issue tracker. Use Github issue tracker for specific salt
184formula:
185
186 https://github.com/salt-formulas/salt-formula-backupninja/issues
187
188For feature requests, bug reports or blueprints affecting entire ecosystem,
189use Launchpad salt-formulas project:
190
191 https://launchpad.net/salt-formulas
192
193You can also join salt-formulas-users team and subscribe to mailing list:
194
195 https://launchpad.net/~salt-formulas-users
196
197Developers wishing to work on the salt-formulas projects should always base
198their work on master branch and submit pull request against specific formula.
199
200 https://github.com/salt-formulas/salt-formula-backupninja
201
202Any questions or feedback is always welcome so feel free to join our IRC
203channel:
204
205 #salt-formulas @ irc.freenode.net