Pull changes from upstream repository
This commit is contained in:
parent
228023ff21
commit
f409f0a74f
46 changed files with 5661 additions and 0 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