Merge pull request #2889 from Security-Onion-Solutions/backupsfix

Backupsfix
This commit is contained in:
Mike Reeves
2021-02-08 10:40:20 -05:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -231,6 +231,15 @@ commonlogrotateconf:
- dayweek: '*'
{% if role in ['eval', 'manager', 'managersearch', 'standalone'] %}
# Lock permissions on the backup directory
backupdir:
file.directory:
- name: /nsm/backup
- user: 0
- group: 0
- makedirs: True
- mode: 700
# Add config backup
/usr/sbin/so-config-backup > /dev/null 2>&1:
cron.present:
@@ -286,4 +295,4 @@ dockerreserveports:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}
{% endif %}

View File

@@ -33,6 +33,8 @@ if [ ! -f $BACKUPFILE ]; then
{%- for LOCATION in BACKUPLOCATIONS %}
tar -rf $BACKUPFILE {{ LOCATION }}
{%- endfor %}
tar -rf $BACKUPFILE /etc/pki
tar -rf $BACKUPFILE /etc/salt
fi