Commit 96416c4a8fb9c22f4273160672e72fc68e2317d9
1 parent
f6ad9fd9
Exists in
master
and in
28 other branches
add config variable for dev_backup
Signed-off-by: Lucas Severo <lucassalves65@gmail.com>
Showing
2 changed files
with
5 additions
and
4 deletions
Show diff stats
config/lappis/config.yaml
@@ -13,4 +13,5 @@ relay_hostname: relay.softwarepublico.lappis | @@ -13,4 +13,5 @@ relay_hostname: relay.softwarepublico.lappis | ||
13 | relay_ip: 10.0.0.15 | 13 | relay_ip: 10.0.0.15 |
14 | alt_ssh_port: 5555 | 14 | alt_ssh_port: 5555 |
15 | from_address: noreply@softwarepublico.lappis | 15 | from_address: noreply@softwarepublico.lappis |
16 | - | 16 | +# define less frequent backup for dev envs |
17 | +dev_backup: true |
cookbooks/backup/templates/rsnapshot-spb.erb
1 | -<%if node['environment'] == 'prod'%> | 1 | +<%if node['config']['dev_backup']%> |
2 | +20 23 1 * * root rsnapshot monthly | ||
3 | +<%else%> | ||
2 | 0 */6 * * * root rsnapshot hourly | 4 | 0 */6 * * * root rsnapshot hourly |
3 | 59 23 * * * root rsnapshot daily | 5 | 59 23 * * * root rsnapshot daily |
4 | 40 23 * * 7 root rsnapshot weekly | 6 | 40 23 * * 7 root rsnapshot weekly |
5 | 20 23 1 * * root rsnapshot monthly | 7 | 20 23 1 * * root rsnapshot monthly |
6 | -<%else%> | ||
7 | -20 23 1 * * root rsnapshot monthly | ||
8 | <%end%> | 8 | <%end%> |