diff --git a/Readme.md b/Readme.md index af67778..d484214 100644 --- a/Readme.md +++ b/Readme.md @@ -46,6 +46,7 @@ ### Crontab tasks +00 13 * * * /root/medicine-config/update_repository.sh 30 13 * * * /root/medicine-config/medicine-remd/update.sh 50 13 * * * /root/medicine-config/medicine-remd/backup_database.sh 20 13 * * * /root/medicine-config/medicine/update.sh diff --git a/cron-tasks/backup_database_medicine.sh b/cron-tasks/backup_database_medicine.sh deleted file mode 100755 index fa8af2e..0000000 --- a/cron-tasks/backup_database_medicine.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -set -e -export LC_ALL=C - -cd /root/medicine-backups/ - -weekday_number=$(date +%u) -weekday=$(date +%A | tr '[:upper:]' '[:lower:]') -backup_filename="medicine_${weekday_number}_${weekday}.sql" -archive_filename="medicine_${weekday_number}_${weekday}.tar.gz" -docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medicine > "${backup_filename}" \ - --exclude-table-data=riisz_logging \ - --exclude-table-data=reversion_* - -if test -f "${archive_filename}"; then - rm "${archive_filename}" -fi -tar -czf "${archive_filename}" "${backup_filename}" -rm "${backup_filename}" diff --git a/cron-tasks/backup_database_medicine_remd.sh b/cron-tasks/backup_database_medicine_remd.sh deleted file mode 100755 index 329ff68..0000000 --- a/cron-tasks/backup_database_medicine_remd.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e -export LC_ALL=C - -cd /root/medicine-backups/ - -weekday_number=$(date +%u) -weekday=$(date +%A | tr '[:upper:]' '[:lower:]') -backup_filename="medicine_remd_${weekday_number}_${weekday}.sql" -archive_filename="medicine_remd_${weekday_number}_${weekday}.tar.gz" -docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medicine_remd > "${backup_filename}" - -if test -f "${archive_filename}"; then - rm "${archive_filename}" -fi -tar -czf "${archive_filename}" "${backup_filename}" -rm "${backup_filename}"