blob: 939250260a40891eef29aed24fcf53151da51e2d [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
Filip Pytloun311d79c2015-10-06 16:28:31 +0200118Backup server rsync/rdiff
119
jan kaufmand6315512016-02-03 21:19:09 +0100120.. code-block:: yaml
121
Filip Pytloun311d79c2015-10-06 16:28:31 +0200122 backupninja:
123 server:
124 enabled: true
125 rdiff: true
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100126 key:
127 client1.domain.com:
Jiri Broulik70715332017-04-27 22:04:41 +0200128 enabled: true
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100129 key: ssh-key
Filip Pytloun311d79c2015-10-06 16:28:31 +0200130
Jiri Broulik34dc3da2018-02-27 11:07:11 +0100131Backup server without strict client policy restriction
132
133.. code-block:: yaml
134
135 backupninja:
136 server:
137 restrict_clients: false
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100138
Andrey21ff9022017-10-12 09:54:09 -0500139Backup client with local storage
140
141.. code-block:: yaml
142
143 backupninja:
144 client:
145 enabled: true
146 target:
147 engine: local
148
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100149More information
150================
Filip Pytloun311d79c2015-10-06 16:28:31 +0200151
152* https://labs.riseup.net/code/projects/backupninja/wiki/Configuration
153* http://www.debian-administration.org/articles/351
154* http://duncanlock.net/blog/2013/08/27/comprehensive-linux-backups-with-etckeeper-backupninja/
155* https://github.com/riseuplabs/puppet-backupninja
156* http://www.ushills.co.uk/2008/02/backup-with-backupninja.html
Filip Pytloun68f73d32017-02-02 13:02:03 +0100157
Ales Komarek7c8d2c92017-02-21 12:18:05 +0100158
Filip Pytloun68f73d32017-02-02 13:02:03 +0100159Documentation and Bugs
160======================
161
162To learn how to install and update salt-formulas, consult the documentation
163available online at:
164
165 http://salt-formulas.readthedocs.io/
166
167In the unfortunate event that bugs are discovered, they should be reported to
168the appropriate issue tracker. Use Github issue tracker for specific salt
169formula:
170
171 https://github.com/salt-formulas/salt-formula-backupninja/issues
172
173For feature requests, bug reports or blueprints affecting entire ecosystem,
174use Launchpad salt-formulas project:
175
176 https://launchpad.net/salt-formulas
177
178You can also join salt-formulas-users team and subscribe to mailing list:
179
180 https://launchpad.net/~salt-formulas-users
181
182Developers wishing to work on the salt-formulas projects should always base
183their work on master branch and submit pull request against specific formula.
184
185 https://github.com/salt-formulas/salt-formula-backupninja
186
187Any questions or feedback is always welcome so feel free to join our IRC
188channel:
189
190 #salt-formulas @ irc.freenode.net