You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
441 B
14 lines
441 B
#!/bin/bash |
|
|
|
su - postgres -c "PGPASSWORD=\"DESTINATION_POSTGRES_PASSWORD\" psql -U postgres -c \"create database DESTINATION_DB_NAME |
|
WITH OWNER = postgres |
|
ENCODING = 'UTF8' |
|
TABLESPACE = pg_default |
|
LC_COLLATE = 'ru_RU.UTF-8' |
|
LC_CTYPE = 'ru_RU.UTF-8' |
|
TEMPLATE = template0 |
|
CONNECTION LIMIT = -1;\"" |
|
|
|
|
|
set "PGPASSWORD=\"DESTINATION_POSTGRES_PASSWORD\"" |
|
su - postgres -c "pg_restore -j 2 -d DESTINATION_DB_NAME Backup_name" |