1
0
Fork 0
This commit is contained in:
Ilya Mukhortov 2024-01-15 21:34:19 +10:00
parent 5a5a8bd466
commit c42cd971c9
3 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ export LC_ALL=C
cd /root/medicine-backups/ cd /root/medicine-backups/
weekday=$(date +%a) weekday=$(date +%A | tr '[:upper:]' '[:lower:]')
backup_filename="medicine_${weekday}.sql" backup_filename="medicine_${weekday}.sql"
archive_filename="medicine_${weekday}.tar.gz" archive_filename="medicine_${weekday}.tar.gz"
docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medicine > "${backup_filename}" \ docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medicine > "${backup_filename}" \

View File

@ -5,7 +5,7 @@ export LC_ALL=C
cd /root/medicine-backups/ cd /root/medicine-backups/
weekday=$(date +%a) weekday=$(date +%A | tr '[:upper:]' '[:lower:]')
backup_filename="medicine_remd_${weekday}.sql" backup_filename="medicine_remd_${weekday}.sql"
archive_filename="medicine_remd_${weekday}.tar.gz" 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}" docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medicine_remd > "${backup_filename}"

2
cron-tasks/crontab.txt Executable file
View File

@ -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