sync with latest upstream source
This commit is contained in:
parent
dff2dc8e3b
commit
23f709b601
51 changed files with 5514 additions and 590 deletions
12
test/test-app/postgresql-init/backup_user.sh
Normal file
12
test/test-app/postgresql-init/backup_user.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Check that user credentials for backup is set
|
||||
|
||||
[[ -v POSTGRESQL_BACKUP_USER && -v POSTGRESQL_BACKUP_PASSWORD ]] || usage "You have to set all variables for user for doing backup: POSTGRESQL_BACKUP_USER, POSTGRESQL_BACKUP_PASSWORD"
|
||||
|
||||
# create backup user with 'backup' database
|
||||
psql --variable=user="$POSTGRESQL_BACKUP_USER" \
|
||||
--variable=password="$POSTGRESQL_BACKUP_PASSWORD" \
|
||||
<<<"
|
||||
CREATE USER :user SUPERUSER password :'password';
|
||||
CREATE DATABASE backup OWNER = :user;
|
||||
ALTER USER :user set default_transaction_read_only = on;
|
||||
"
|
||||
Loading…
Add table
Add a link
Reference in a new issue