1
0
Fork 0
This commit is contained in:
Ilya Mukhortov 2024-01-15 21:22:31 +10:00
parent 997faa17c1
commit ed601ebe15
2 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,8 @@ docker exec -i medicine-stack-postgres pg_dump --no-owner -U postgres -F p medic
--exclude-table-data=riisz_logging \
--exclude-table-data=reversion_*
rm "${archive_filename}" || true
if test -f "${archive_filename}"; then
rm "${archive_filename}"
fi
tar -czf "${archive_filename}" "${backup_filename}"
rm "${backup_filename}"

View File

@ -9,6 +9,8 @@ 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}"
rm "${archive_filename}" || true
if test -f "${archive_filename}"; then
rm "${archive_filename}"
fi
tar -czf "${archive_filename}" "${backup_filename}"
rm "${backup_filename}"