diff --git a/cron-tasks/backup_database_medicine.sh b/cron-tasks/backup_database_medicine.sh index 09f12ae..6aab84d 100755 --- a/cron-tasks/backup_database_medicine.sh +++ b/cron-tasks/backup_database_medicine.sh @@ -5,7 +5,7 @@ export LC_ALL=C cd /root/medicine-backups/ -weekday=$(date +%a) +weekday=$(date +%A | tr '[:upper:]' '[:lower:]') backup_filename="medicine_${weekday}.sql" archive_filename="medicine_${weekday}.tar.gz" docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medicine > "${backup_filename}" \ diff --git a/cron-tasks/backup_database_medicine_remd.sh b/cron-tasks/backup_database_medicine_remd.sh index b7a0e0c..95f4551 100755 --- a/cron-tasks/backup_database_medicine_remd.sh +++ b/cron-tasks/backup_database_medicine_remd.sh @@ -5,7 +5,7 @@ export LC_ALL=C cd /root/medicine-backups/ -weekday=$(date +%a) +weekday=$(date +%A | tr '[:upper:]' '[:lower:]') backup_filename="medicine_remd_${weekday}.sql" archive_filename="medicine_remd_${weekday}.tar.gz" docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medicine_remd > "${backup_filename}" diff --git a/cron-tasks/crontab.txt b/cron-tasks/crontab.txt new file mode 100755 index 0000000..e0c6139 --- /dev/null +++ b/cron-tasks/crontab.txt @@ -0,0 +1,2 @@ +59 23 * * * /root/medicine-config/cron-tasks/backup_database_medicine.sh +55 23 * * * /root/medicine-config/cron-tasks/backup_database_medicine_remd.sh