From c42cd971c909ac5a7178ea313ffa2ad6c77a5fb5 Mon Sep 17 00:00:00 2001 From: Ilya Mukhortov Date: Mon, 15 Jan 2024 21:34:19 +1000 Subject: [PATCH] pass --- cron-tasks/backup_database_medicine.sh | 2 +- cron-tasks/backup_database_medicine_remd.sh | 2 +- cron-tasks/crontab.txt | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 cron-tasks/crontab.txt 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