mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Merge pull request #9937 from Security-Onion-Solutions/guifixes
Re-Work Backups
This commit is contained in:
@@ -19,6 +19,7 @@ config_backup_script:
|
||||
- source: salt://backup/tools/sbin/so-config-backup.jinja
|
||||
- defaults:
|
||||
BACKUPLOCATIONS: {{ BACKUP_MERGED.locations }}
|
||||
DESTINATION: {{ BACKUP_MERGED.destination }}
|
||||
|
||||
# Add config backup
|
||||
so_config_backup:
|
||||
|
||||
@@ -3,4 +3,5 @@ backup:
|
||||
- /opt/so/saltstack/local
|
||||
- /etc/pki
|
||||
- /etc/salt
|
||||
- /opt/so/conf/kratos
|
||||
- /nsm/kratos
|
||||
destination: "/nsm/backup"
|
||||
10
salt/backup/soc_backup.yaml
Normal file
10
salt/backup/soc_backup.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
backup:
|
||||
locations:
|
||||
description: List of locations to back up to the destination.
|
||||
helpLink: backup.html
|
||||
global: True
|
||||
destination:
|
||||
description: Directory to store the configuration backups in.
|
||||
helpLink: backup.html
|
||||
global: True
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
. /usr/sbin/so-common
|
||||
|
||||
TODAY=$(date '+%Y_%m_%d')
|
||||
BACKUPFILE="/nsm/backup/so-config-backup-$TODAY.tar"
|
||||
BACKUPDIR={{ DESTINATION }}
|
||||
BACKUPFILE="$BACKUPDIR/so-config-backup-$TODAY.tar"
|
||||
MAXBACKUPS=7
|
||||
|
||||
# Create backup dir if it does not exist
|
||||
|
||||
@@ -1486,9 +1486,6 @@ create_strelka_pillar() {
|
||||
backup_pillar() {
|
||||
title "Create the backup pillar file"
|
||||
touch $adv_backup_pillar_file
|
||||
printf '%s\n'\
|
||||
"backup:"\
|
||||
" locations: []" > "$backup_pillar_file"
|
||||
}
|
||||
|
||||
soctopus_pillar() {
|
||||
|
||||
Reference in New Issue
Block a user