Files
scwrypts/zsh/cloud/aws/rds/load-backup
T

27 lines
487 B
Bash
Raw Normal View History

2022-08-01 15:53:40 -06:00
#!/bin/zsh
2023-02-21 18:44:27 -07:00
DEPENDENCIES+=()
REQUIRED_ENV+=()
use cloud/aws/rds
use db/postgres
CHECK_ENVIRONMENT
2022-08-01 15:53:40 -06:00
#####################################################################
2023-02-21 18:44:27 -07:00
LOAD_BACKUP() {
2022-08-01 15:53:40 -06:00
local DB_HOST DB_PORT DB_NAME DB_USER DB_PASS
2023-02-21 18:44:27 -07:00
RDS__GET_DATABASE_CREDENTIALS $@ || return 1
2022-08-01 15:53:40 -06:00
2023-02-21 18:44:27 -07:00
PG_RESTORE \
2022-08-01 15:53:40 -06:00
--host $DB_HOST \
--port $DB_PORT \
--name $DB_NAME \
--user $DB_USER \
--pass $DB_PASS \
;
}
#####################################################################
2023-02-21 18:44:27 -07:00
LOAD_BACKUP $@