mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
Merge pull request #2889 from Security-Onion-Solutions/backupsfix
Backupsfix
This commit is contained in:
@@ -231,6 +231,15 @@ commonlogrotateconf:
|
|||||||
- dayweek: '*'
|
- dayweek: '*'
|
||||||
|
|
||||||
{% if role in ['eval', 'manager', 'managersearch', 'standalone'] %}
|
{% 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
|
# Add config backup
|
||||||
/usr/sbin/so-config-backup > /dev/null 2>&1:
|
/usr/sbin/so-config-backup > /dev/null 2>&1:
|
||||||
cron.present:
|
cron.present:
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ if [ ! -f $BACKUPFILE ]; then
|
|||||||
{%- for LOCATION in BACKUPLOCATIONS %}
|
{%- for LOCATION in BACKUPLOCATIONS %}
|
||||||
tar -rf $BACKUPFILE {{ LOCATION }}
|
tar -rf $BACKUPFILE {{ LOCATION }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
tar -rf $BACKUPFILE /etc/pki
|
||||||
|
tar -rf $BACKUPFILE /etc/salt
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user