blob: 92e30e902db2251444c861d0401ded7f95594cf5 [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
Martin Polreich41ee69c2018-03-05 13:17:02 +010078.. code-block:: yaml
79
80 backupninja:
81 client:
82 enabled: true
83 auto_backup_disabled: false
84 backup_times:
85 day_of_week: 1
86 hour: 2
87 minute: 32
88
Martin Polreich41ee69c2018-03-05 13:17:02 +010089.. code-block:: yaml
90
91 backupninja:
92 client:
93 enabled: true
94 auto_backup_disabled: false
95 backup_times:
96 day_of_month: 24
97 hour: 14
98 minute: 12
99
Martin Polreichef70a882018-04-06 10:48:32 +0200100Backup client with defined number of backups to keep
Martin Polreiched7b5c92018-03-21 11:49:37 +0100101
102..code-block:: yaml
103
104 backupninja:
105 client:
106 enabled: true
Martin Polreichef70a882018-04-06 10:48:32 +0200107 target:
Martin Polreiched7b5c92018-03-21 11:49:37 +0100108 engine: rsync
109 host: 10.10.10.208
110 user: backupninja
111 keep: 4
112
Filip Pytloun311d79c2015-10-06 16:28:31 +0200113Backup server rsync/rdiff
114
jan kaufmand6315512016-02-03 21:19:09 +0100115.. code-block:: yaml
116
Filip Pytloun311d79c2015-10-06 16:28:31 +0200117 backupninja:
118 server:
119 enabled: true
120 rdiff: true
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100121 key:
122 client1.domain.com:
Jiri Broulik70715332017-04-27 22:04:41 +0200123 enabled: true
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100124 key: ssh-key
Filip Pytloun311d79c2015-10-06 16:28:31 +0200125
Jiri Broulik34dc3da2018-02-27 11:07:11 +0100126Backup server without strict client policy restriction
127
128.. code-block:: yaml
129
130 backupninja:
131 server:
132 restrict_clients: false
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100133
Andrey21ff9022017-10-12 09:54:09 -0500134Backup client with local storage
135
136.. code-block:: yaml
137
138 backupninja:
139 client:
140 enabled: true
141 target:
142 engine: local
143
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100144More information
145================
Filip Pytloun311d79c2015-10-06 16:28:31 +0200146
147* https://labs.riseup.net/code/projects/backupninja/wiki/Configuration
148* http://www.debian-administration.org/articles/351
149* http://duncanlock.net/blog/2013/08/27/comprehensive-linux-backups-with-etckeeper-backupninja/
150* https://github.com/riseuplabs/puppet-backupninja
151* http://www.ushills.co.uk/2008/02/backup-with-backupninja.html
Filip Pytloun68f73d32017-02-02 13:02:03 +0100152
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100153
Filip Pytloun68f73d32017-02-02 13:02:03 +0100154Documentation and Bugs
155======================
156
157To learn how to install and update salt-formulas, consult the documentation
158available online at:
159
160 http://salt-formulas.readthedocs.io/
161
162In the unfortunate event that bugs are discovered, they should be reported to
163the appropriate issue tracker. Use Github issue tracker for specific salt
164formula:
165
166 https://github.com/salt-formulas/salt-formula-backupninja/issues
167
168For feature requests, bug reports or blueprints affecting entire ecosystem,
169use Launchpad salt-formulas project:
170
171 https://launchpad.net/salt-formulas
172
173You can also join salt-formulas-users team and subscribe to mailing list:
174
175 https://launchpad.net/~salt-formulas-users
176
177Developers wishing to work on the salt-formulas projects should always base
178their work on master branch and submit pull request against specific formula.
179
180 https://github.com/salt-formulas/salt-formula-backupninja
181
182Any questions or feedback is always welcome so feel free to join our IRC
183channel:
184
185 #salt-formulas @ irc.freenode.net