1
0
Fork 0
This commit is contained in:
Ilya Mukhortov 2020-10-12 19:13:31 +10:00
parent 2049e224da
commit c00a7632d5
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
set -e
COMMAND="$1" COMMAND="$1"
ARGUMENT="$2" ARGUMENT="$2"
@ -11,7 +13,7 @@ pull_images() {
backup_database() { backup_database() {
year_month=$(date +%Y%m) year_month=$(date +%Y%m)
backup_date = $(date %Y%m%d_%H%M) backup_date=$(date +%Y%m%d_%H%M)
mkdir -p foo "/root/medicine-backups/${year_month}" mkdir -p foo "/root/medicine-backups/${year_month}"
docker exec -i medicine-stack-postgres \ docker exec -i medicine-stack-postgres \
pg_dump --no-owner -U postgres -F c \ pg_dump --no-owner -U postgres -F c \