Update backup_bin.sh

exclusion des répertoires audit, diag et admin
This commit is contained in:
Yacine31
2024-08-02 14:41:12 +02:00
parent 5a0e2576e9
commit 8b7a434fe6

View File

@@ -34,8 +34,15 @@ install -d ${BKP_APP_LOCATION}
# sauvegarde
#------------------------------------------------------------------------------
# compression du repertoire oracle app
cd ${BKP_APP_LOCATION}
# suppression des anciennes sauvegardes
rm -fv backup_bin_oraapp_*.tgz
sudo tar cfz backup_bin_oraapp_$(date +%Y%m%d).tgz ${ORA_APP_LOCATION} && curl -d "$(hostname) - backup des binaires terminée" ${NTFY_URL}
# compression du repertoire oracle app avec exclusion des répertoires admin, diag et audit
sudo tar --exclude='${ORA_APP_LOCATION}/oracle/admin' \
--exclude='${ORA_APP_LOCATION}/oracle/audit' \
--exclude='${ORA_APP_LOCATION}/oracle/diag' \
cfz backup_bin_oraapp_$(date +%Y%m%d).tgz ${ORA_APP_LOCATION}
# notification
curl -d "$(hostname) - backup des binaires terminée" ${NTFY_URL}