Replace the hardcoded primary pg IP with a hostname
This commit is contained in:
parent
5cb390f340
commit
a4a35da0ff
@ -27,7 +27,7 @@ unless primary.nil?
|
|||||||
command <<-EOF
|
command <<-EOF
|
||||||
systemctl stop #{postgresql_service}
|
systemctl stop #{postgresql_service}
|
||||||
mv #{postgresql_data_dir} #{postgresql_data_dir}.old
|
mv #{postgresql_data_dir} #{postgresql_data_dir}.old
|
||||||
pg_basebackup -h 10.1.1.167 -U replication -D #{postgresql_data_dir} -R
|
pg_basebackup -h pg.kosmos.local -U replication -D #{postgresql_data_dir} -R
|
||||||
chown -R postgres:postgres #{postgresql_data_dir}
|
chown -R postgres:postgres #{postgresql_data_dir}
|
||||||
systemctl start #{postgresql_service}
|
systemctl start #{postgresql_service}
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user