Merge pull request #9937 from Security-Onion-Solutions/guifixes

Re-Work Backups
This commit is contained in:
Mike Reeves
2023-03-16 09:42:07 -04:00
committed by GitHub
5 changed files with 15 additions and 5 deletions

View File

@@ -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:

View File

@@ -3,4 +3,5 @@ backup:
- /opt/so/saltstack/local
- /etc/pki
- /etc/salt
- /opt/so/conf/kratos
- /nsm/kratos
destination: "/nsm/backup"

View 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

View File

@@ -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

View File

@@ -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() {