Update mssql-backup.sh
This commit is contained in:
parent
6b748acfb9
commit
bd07fac8f7
@ -2,10 +2,32 @@
|
||||
# Script per il backup di database MS SQL Server
|
||||
# Autore: Lorenzo Paciotti & Mattia Tadini
|
||||
# Nome del file: mssql-backup.sh
|
||||
# Revisione: 1.13
|
||||
# Revisione: 1.15
|
||||
|
||||
# Prerequisiti
|
||||
|
||||
apt install ftp msmtp -y
|
||||
mkdir -p /$BACKUPDIR
|
||||
cat > /etc/msmtprc <<'EOF'
|
||||
# Configurazione msmtp - account predefinito
|
||||
defaults
|
||||
auth on
|
||||
tls on
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
host relay.poloinformatico.it
|
||||
port 587
|
||||
user brass@relay.poloinformatico.it
|
||||
from brass@relay.poloinformatico.it
|
||||
password DMKqP9vUYn8s
|
||||
logfile ~/.msmtp.log
|
||||
|
||||
# Impostiamo l'account predefinito
|
||||
account default
|
||||
|
||||
EOF
|
||||
|
||||
# Load configuration from external file
|
||||
CONFIG_FILE="/zucchetti/backupdb/config.env"
|
||||
CONFIG_FILE="/zucchetti/backupdb/mssqlconfig.env"
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
source "$CONFIG_FILE"
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user