You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ClinicalTrialsDataProcessing/Scripts/Backup_AACT_work.sh

11 lines
388 B
Bash

#!/bin/bash
backup_dir="/mnt/will/large_data/Research_large_data/ClinicalTrialsDataProcessing/containers/AACT_Reloader/backup/"
date_stamp=$(date +%Y%m%d_%H%M%S)
filename="aact_db_backup_${date_stamp}.sql"
container_name = ${1:-aact_db}
podman exec "$container_name" pg_dump -U root aact_db > "${backup_dir}/${filename}"
# Optional: compress the backup
gzip "${backup_dir}/${filename}"